; Color, ColorRed(), ColorBlue(), ColorGreen() Example
; Gotta be in graphics mode
Graphics 640,480, 8
Cls
; Let's set the color to something random
SeedRnd MilliSecs() ; Seed the randomizer with the current system time in milliseconds.
Red = Rnd(0,63)
Green = Rnd(0,63)
Blue = Rnd(0,63)
Color Red,Green,Blue
; Now let's see what they are!
Text 10,10,"This Text is printed in Red=" + ColorRed() + " Green=" + ColorGreen() + " Blue=" + ColorBlue() + "!"
WaitKey
Color 255,255,255
Print : Print : Print
Print Red
Print Green
Print Blue
WaitKey
The purpose of this program whas to see how to use 8 bits, 256 colors mode.
I need it for my tile/sprite ripper/editor.
When i use Graphics 640,480 , i get 16 bits colors and colorred(), colorgreen(), colorblue() return the good value.
When i use Graphics 640,480,8 , i get 16 bits colors and colorred(), colorgreen(), colorblue() return bads values (all at 255). And the colors palette is not good (allways white (36,28,50 for example this is not a white color palette)
What is wrong with BB palette colors ?
; Gotta be in graphics mode
Graphics 640,480, 8
Cls
; Let's set the color to something random
SeedRnd MilliSecs() ; Seed the randomizer with the current system time in milliseconds.
Red = Rnd(0,63)
Green = Rnd(0,63)
Blue = Rnd(0,63)
Color Red,Green,Blue
; Now let's see what they are!
Text 10,10,"This Text is printed in Red=" + ColorRed() + " Green=" + ColorGreen() + " Blue=" + ColorBlue() + "!"
WaitKey
Color 255,255,255
Print : Print : Print
Print Red
Print Green
Print Blue
WaitKey
The purpose of this program whas to see how to use 8 bits, 256 colors mode.
I need it for my tile/sprite ripper/editor.
When i use Graphics 640,480 , i get 16 bits colors and colorred(), colorgreen(), colorblue() return the good value.
When i use Graphics 640,480,8 , i get 16 bits colors and colorred(), colorgreen(), colorblue() return bads values (all at 255). And the colors palette is not good (allways white (36,28,50 for example this is not a white color palette)
What is wrong with BB palette colors ?