comp • gb.image • color

Color (gb.image)

This static class defines predefined color constants, and some useful other methods to deal with colors.

This class is static.
This class acts like a
Splits a color into its components, and returns them as a ColorInfo object.
read-only
static array.

Static methods

Constants
Blends the Source color into the Destination color, according to the alpha channel of both colors, and returns the resulting color.
Blend  
Returns a darker version of a color.
Darker  
Return the specified color desaturated, i.e. grayed.
Desaturate  
Return the RGB distance between two colors as a floating point number between 0.0 and 1.0.
Distance  
Return the alpha component of the specified color.
GetAlpha  
Return a color that is the RGB mean between Color1 and Color2
Gradient  
Returns a color value from its hue, saturation, value and alpha components.
HSV  
Returns a lighter version of a color.
Lighter  
Returns a mix between Color1 and Color2.
Merge  
Returns a color value from its red, green, blue and alpha components.
RGB  
Change the alpha component of a color and return it.
SetAlpha  
Set the HSVA components of the specified color and returns it as an integer value.
SetHSV  
Set the RGBA components of the specified color and returns it as an integer value.
SetRGB  
Numeric value representing the black color.
Black  
Numeric value representing the blue color.
Blue  
Numeric value representing the cyan color.
Cyan  
Numeric value representing the dark blue color.
DarkBlue  
Numeric value representing the dark cyan color.
DarkCyan  
Numeric value representing the dark gray color.
DarkGray  
Numeric value representing the dark green color.
DarkGreen  
Numeric value representing the dark magenta color.
DarkMagenta  
Numeric value representing the dark red color.
DarkRed  
Numeric value representing the dark yellow color.
DarkYellow  
Numeric value representing the "default color" of whatever it's applied to.
Default  
Numeric value representing the gray color.
Gray  
Numeric value representing the green color.
Green  
Numeric value representing the light gray color.
LightGray  
Numeric value representing the magenta color.
Magenta  
Numeric value representing the orange color.
Orange  
Numeric value representing the pink color.
Pink  
Numeric value representing the red color.
Red  
Numeric value indicating that the object is to be drawn transparently, if supported.
Transparent  
Numeric value representing the purple color.
Violet  
Numeric value representing the white color.
White  
Numeric value representing the yellow color.
Yellow  

Examples

' this example uses 'color from gb.qt4'
Label1.Background = Color.LightForeground
Label1.Foreground = Color.VisitedForeground

' this example uses 'color from gb.image'
TextBox2.Background = Color.Yellow
TextBox2.Foreground = Color.Black

See also