Main Menu

Rgbs

Started by kevin, September 19, 2003, 06:18:47 PM

Previous topic - Next topic

kevin

The RGB()  function

PlayBasic code

PlayBASIC Code: [Select]
; Make a packed RGB colour value
ThisColour= Rgb(255,45,100)

; Get the level of RED from this packed colour value
R=RGbR(ThisColour)

; Get the level of GREEN from this packed colour value
G=RGbG(ThisColour)

; Get the level of BLUE from this packed colour value
B=RGbB(ThisColour)

ThisColour2= Rgb(R,G,B)

Print Hex$(ThisColour)
Print r
Print g
Print b
Print Hex$(ThisColour2)



 

  Also see:  PlayBASIC Documentation COLOURS