This routine converts a color given in values of the HSB/HSV colorspace to its respective representation within the RGB colorspace.
Note that the results of this routine are returned as intended side effects through the given arguments, hence you must provide type LONG variables (signed or unsigned) for the results.
SYNTAX:
HSBtoRGB hue~&, sat~&, bri~&, red~&, gre~&, blu~&
INPUTS:
hue~& (_UNSIGNED LONG)
- The Hue value of the color to convert, ranges from 0 for red over 21845 (&H5555) for green and 43690 (&HAAAA) for blue to 65535 (&HFFFF) red again.
sat~& (_UNSIGNED LONG)
- The Saturation value of the color to convert, which is 0 for 0% to 65535 for 100%.
bri~& (_UNSIGNED LONG)
- The Brightness value of the color to convert, which is 0 for 0% to 65535 for 100%.
RESULT:
red~& ((_UNSIGNED) LONG variable)
- The resulting red component in the range 0-65535.
gre~& ((_UNSIGNED) LONG variable)
- The resulting green component in the range 0-65535.
blu~& ((_UNSIGNED) LONG variable)
- The resulting blue component in the range 0-65535.