Convenience functions for the HSB/HSV colorspace, parameters and results are similar to the QB64 functions _RGB32/_RGBA32 for the RGB colorspace with the only difference, that the HSB parameters are given as SINGLEs.
SYNTAX:
color32value~& = HSB32~& (hue!, sat!, bri!) color32value~& = HSBA32~& (hue!, sat!, bri!, alp%)
INPUTS:
hue! (SINGLE)
- The Hue value of the desired color from 0-360 degrees. The color gradient starts with red (0 deg.), goes over yellow (60 deg.) to green (120 deg.), then further over cyan (180 deg.) to blue (240 deg.) and finally over magenta (300 deg.) back to red (360 or 0 deg.).
sat! (SINGLE)
- The Saturation value of the desired color from 0-100%, as lower this value is, as more the resulting color will fade into a gray value.
bri! (SINGLE)
- The Brightness value of the desired color from 0-100%, as higher this value is, as higher is the intensity of the resulting color.
alp% (INTEGER)
- The desired alpha intensity from 0-255 is directly put through to the RGB alpha channel (used by the HSBA32() function only).
RESULT:
color32value~& (_UNSIGNED LONG)
- The HSB32() function returns the converted and ready to use 32-bit ARGB color value with the specified hue, saturation and brightness intensities always with full alpha.
- The HSBA32() function returns the converted and ready to use 32-bit ARGB color value with the specified hue, saturation, brightness and alpha component intensities.