the buttom function is just for that really...
in my own .h file for this the colour types are constants
so
#constant ClrRed 1
#constant ClrGreen 2
#constant ClrBlue 3
as long as you constant what you use, then you can have any sceme you like for this ...
then all you do is take your HSL colour which should be a word value 0-65535
i'd make a simple buffer function to store the values like this
#constant ClrRed 1
#constant ClrGreen 2
#constant ClrBlue 3
type RGBA
red as byte
green as byte
blue as byte
alpha as byte
endtype
wColour as RGBA
wClrIn as word = 0xFFFFFFFF
wColour.red = FMT_RGB( wClrIn, ClrRed )
wColour.green = FMT_RGB( wClrIn, ClrGreen )
wColour.blue = FMT_RGB( wClrIn, ClrBlue )
you'll see that now you have Red, Green & Blue from White
if you want to just edit minor things about the format, remember that you must bitshift right (>>

and go from the highest to lowest stopping at the point you wish to use, using that as the highest
this might seem confusing becuase this is because natively your graphcis cards don't support this form of colour spacing - so everything has to be edited to accustom for it.
basically the main sums above are what are needed to calculate these parts ... as long as you stick to these you'll be oki
`// YBR to RGB
function FMT_RGB( wColour as word, intType as byte )
`// private declarations
local intReturn as word
local Y as word
local Cb as word
local Cr as word
`// missing part
Cr = ( wColour>>16 )
Cb = ( wColour>>8 ) - ( wColour>>16 )
Y = wColour - ( wColour>>8 ) - ( wColour>>16 )
`// grab either the Red, Green or Blue Element based on type
if intType = ClrRed then intReturn = Y + 1.402 * ( Cr - 128 )
if intType = ClrGreen then intReturn = Y - 0.34414 * ( Cb - 128 ) - 0.71414 * ( Cr - 128 )
if intType = ClrBlue then intReturn = Y + 1.772 * ( Cb - 128 )
endfunction intReturn
lol forgot to unbitshift the value before use
Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?