Python Forum
Why doesn't my code display?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why doesn't my code display?
#4
This is unrelated to your problem, but I saw you wrote out all the colors your self and I feel bad so here's a little something I made for you and anyone else to use. Thank me later. (btw use it by doing something like "bgColor = color.light_green")
import random

class colour:
  #Common colours

  #green
  light_green = (0, 252, 0)
  dark_green = (0, 58, 18)
  green = (5, 191, 24)

  #blue
  light_blue = (2, 162, 255)
  dark_blue = (0, 46, 73)
  blue = (5, 123, 191)

  #red
  light_red = (249, 2, 23)
  dark_red = (104, 1, 9)
  red = (201, 4, 4)
  brown = (60, 50, 0)
  orange = (255, 150, 0)

  #pink
  light_pink = (245, 107, 255)
  dark_pink = (85, 1, 91)
  pink = (182, 25, 193)
  purple = (85, 1, 91)

  #yellow
  yellow = (225, 225, 0)

  #Less Common Colours

  turquoise = (0, 255, 178)
  white = (255, 255, 255)
  black = (0, 0, 0)
  light_grey = (200, 200, 200)
  silver = (150, 150, 150)
  fog = (20, 20, 20)
  dim_grey = (50, 50, 50)
  mist = (120, 120, 120)
  sky = (209, 226, 255)
  dark_grey = (127, 127, 127)
  cyan = (81, 210, 239)
  magenta = (188, 5, 136)
  sarcoline = (155, 163, 160)
  liver = (76, 76, 76)
  lilac = (175, 140, 175)
  amber = (226, 168, 31)
  maroon = (109, 30, 26)
  

  #random colour generator

  randomCol = (0, 0, 0)

  col1 = random.randint(0, 255)
  col2 = random.randint(0, 255)
  col3 = random.randint(0, 255)
  randomCol = (col1,col2,col3)
Reply


Messages In This Thread
Why doesn't my code display? - by beginnercoder04 - Apr-14-2018, 10:59 PM
RE: Why doesn't my code display? - by sparkz_alot - Apr-15-2018, 01:27 PM
RE: Why doesn't my code display? - by CharlieGallie - Apr-22-2018, 11:45 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020