back to Table of Contents


RGBtoHSB (sub)

This routine converts a color given in values of the RGB colorspace to its respective representation within the HSB/HSV 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:

RGBtoHSB red~&, gre~&, blu~&, hue~&, sat~&, bri~&

INPUTS:

red~& (_UNSIGNED LONG)

gre~& (_UNSIGNED LONG)

blu~& (_UNSIGNED LONG)


RESULT:

hue~& ((_UNSIGNED) LONG variable)

sat~& ((_UNSIGNED) LONG variable)

bri~& ((_UNSIGNED) LONG variable)


back to Table of Contents