Contents



DH_HexRGBtoRGB & DH_HSxToRGB

Next

DH_HexRGBtoRGB

Function:

Converts HTML-style hexadecimal RGB numbers, such as FFFFFF for white, and FF0000 for red, to Windows COLORREF RGB format, for use by other DH sub-control modules with color inputs. The module is bidirectional.


Left-hand side pin:

Hex RGB - 6-digit hexadecimal number of the form RRGGBB, where RR, GG, and BB are the color's red, green, and blue components, respectively, each on a scale of 0x00 - 0xFF.


Right
-hand side pin:

RGB - Windows COLORREF RGB value corresponding to the Hex RGB input.

 

DH_HSxToRGB

Function:

Converts between HSV (HSB) and HSL color values and the Windows COLORREF RGB format used by other DH sub-control modules with color inputs. The module is bidirectional.



Left-hand side pins:

H - The color's hue value, on a scale determined by the Scale Maxima parameter (see below).

S - The color's saturation value, on a scale determined by the scale Maxima parameter.

B/V/L - The color's brightness or luminance value, on a scale determined by the Scale Maxima parameter.


Right
-hand side pin:

RGB - Windows COLORREF value corresponding to the HSV (HSB) or HSL input.
 

Parameters: (right-click Properties)

Scale Maxima - Selects the maximum values for each of the H, S and B/V/L scales, as used in some common software:

  •  1-1-1 -  Each parameter is expressed as a number between 0.0 and 1.0. The SynthEdit™ Tinted Bitmap Image module uses this scale with HSB and gamma correction.
     

  • 360-100-100 - Measures hue on a scale of 0 - 360°, and saturation and brightness as percents, 0 - 100%. Used by PhotoShop™ (HSB).
     

  • 240-240-240 - Measures all 3 parameters on a scale of 0 - 240. Used by Windows™ color selection dialogs (HSL).
     

  • 255-255-255 - Measures all 3 parameters on a scale of 0 - 255. Used by Paint Shop Pro™ (HSL).

Color Space - Selects the HSV (HSB) or HSL color model.

Gamma Correction - On or Off. This is the same gamma correction used by the SE Tinted Bitmap Image. Thanks to Jeff McClintock for making the source code for this available.


All trademarks are the properties of their owners.

top

Next