REM Jesse Gordon 3-25-2003. Updated comments on 2-10-2004 REM This program demonstrates how the formula: REM colour = 32 + hue + ((2 - lum) * 72) + ((2 - sat) * 24) REM can be used to calculate Hue, Luminance, Saturation into REM an 8 bit number for screen 13 default colormap table. REM There are 24 Hue levels (0 to 23) , 3 Saturation (0 to 2) REM and 3 Luminance levels (0 to 2). REM Hue is the color/wavelength REM Saturation is the degree to which the color has color. REM That is to say, that with a saturation of 0, you have mostly REM a grey or white color. With a saturation of 2, the color is REM bright and colorfull. REM Lum is the brightness of it. If lum=0, then the color or gray REM won't be very bright. If lum=2 then the color or gray will REM be bright. SCREEN 13 'Lets draw a nice chart showing all the colors: CLS hue = 0 FOR y = 0 TO 3 FOR x = 0 TO 5 x1 = (x * 4) y1 = (y * 4) sat = 0: Lum = 0 FOR yy = y1 TO (y1 + 2) FOR xx = x1 TO (x1 + 2) colour = 32 + hue + ((2 - Lum) * 72) + ((2 - sat) * 24) LINE ((xx * 12), (yy * 12))-((xx * 12) + 11, (yy * 12) + 11), colour, BF sat = sat + 1 NEXT sat = 0 Lum = Lum + 1 NEXT hue = hue + 1 NEXT NEXT