; ColorBlue Example ; ----------------- Graphics 640,480,0,2 SetBuffer BackBuffer() angle#=0 While Not KeyDown(1) Cls ; Smoothly cycle the drawing colour through a rainbow angle=angle+1 Color 128+Sin(angle)*127,128+Sin(angle+120)*127,128+Sin(angle+240)*127 ; Draw a swatch in the current drawing colour Rect 220,120,200,200,1 ; ColorBlue reads back the blue part of the current drawing colour b=ColorBlue() ; Bar showing just the blue component Color 0,0,255 Rect 20,420,b,20,1 Rect 20,420,256,20,0 Color 255,255,255 Text 0,0,"Esc: exit" Text 0,20,"ColorBlue() = "+b Flip Wend End