This is just a small function that takes a colour as a string and returns the RGB integer for you. I have only added 26 colours but it would be a piece of cake to add more. Should simplify things for people who are only making simple colour games or text games.
FUNCTION Colour(colour$)
`This function takes a colour as a string and returns the RGB integer of that colour
SELECT colour$
CASE "black" : colour = RGB (0, 0, 0) : ENDCASE
CASE "dark grey" : colour = RGB(117, 117, 117) : ENDCASE
CASE "grey" : colour = RGB(187, 187, 187) : ENDCASE
CASE "light grey" : colour = RGB(205, 205, 205) : ENDCASE
CASE "dark brown" : colour = RGB(99, 50, 50) : ENDCASE
CASE "brown" : colour = RGB(128, 64, 64) : ENDCASE
CASE "light brown" : colour = RGB(172, 89, 89) : ENDCASE
CASE "dark purple" : colour = RGB(131, 7, 118) : ENDCASE
CASE "purple" : colour = RGB(230, 0, 230) : ENDCASE
CASE "light purple" : colour = RGB(255, 130, 255) : ENDCASE
CASE "dark blue" : colour = RGB(0, 0, 217) : ENDCASE
CASE "blue" : colour = RGB(0, 0, 255) : ENDCASE
CASE "light blue" : colour = RGB(177, 199, 254) : ENDCASE
CASE "dark red" : colour = RGB(196, 0, 0) : ENDCASE
CASE "red" : colour = RGB(255, 0, 0) : ENDCASE
CASE "light red" : colour = RGB(255, 102, 98) : ENDCASE
CASE "dark green" : colour = RGB(0, 149, 0) : ENDCASE
CASE "green" : colour = RGB(0, 255, 0) : ENDCASE
CASE "light green" : colour = RGB(174, 255, 174) : ENDCASE
CASE "dark orange" : colour = RGB(240, 120, 0) : ENDCASE
CASE "orange" : colour = RGB(255, 128, 0) : ENDCASE
CASE "light orange" : colour = RGB(255, 165,74) : ENDCASE
CASE "dark yellow" : colour = RGB(217, 217, 0) : ENDCASE
CASE "yellow" : colour = RGB(255, 255, 0) : ENDCASE
CASE "light yellow" : colour = RGB(255, 255, 151) : ENDCASE
CASE "white" : colour = RGB (255, 255, 255) : ENDCASE
ENDSELECT
ENDFUNCTION colour
SYNTAX:
ReturnValue = Colour(
"red")
Then you could do the following, for instance:
INK ReturnValue, 0
Life is like a penis:
When it's soft you can't beat it, when it's hard you get screwed.