Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter FiveGeneral Functions (continued)

5.22.5 Color Functions

Typically the binary versions of 24-bit color are represented in an RGB format. In hex the value is 0x00BBGGRR where B, G and R are blue, green, and red respectively. This series of functions aid in the building and parsing of binary RGB values.

When strings, colors can be represented in hex #rrggbb or shorthand #rgb; in CSS format as ‘rgb(rrr,ggg,bbb)’ as either hex or decimal values; or as web safe color names such as ‘Red’ or ‘Lime’.

Functions:

ApplyTintToColor — Applies a tint percentage to a color string and returns a string in the incoming format.

ApplyTintToRGB — Applies a tint percentage to an incoming RGB value and returns an RGB value.

ColorToRGB — Makes a color string into an RGB dword.

GetRedValue — Gets the red byte from RGB value (dword) or string.

GetGreenValue — Gets the green byte from RGB value (dword) or string.

GetBlueValue — Gets the blue byte from RGB value (dword) or string.

IsDefaultColor — Tests for the value being RGB_DEFAULT for auto or transparent values.

MakeRGBColor — Makes an RGB value from a color name, RGB string or 8-bit ‘r g b’ values.

RGBToColor — Makes an RGB value into a color string.