Color (gb.image)
This static class defines predefined color constants, and some useful other methods to deal with colors.
Konstanten
Black
|
Numeric value representing the black color.
|
Blue
|
Numeric value representing the blue color.
|
Cyan
|
Numeric value representing the cyan color.
|
DarkBlue
|
Numeric value representing the dark blue color.
|
DarkCyan
|
Numeric value representing the dark cyan color.
|
DarkGray
|
Numeric value representing the dark gray color.
|
DarkGreen
|
Numeric value representing the dark green color.
|
DarkMagenta
|
Numeric value representing the dark magenta color.
|
DarkOrange
|
Numeric value representing the dark orange color.
|
DarkPurple
|
Numeric value representing the dark purple color.
|
DarkRed
|
Numeric value representing the dark red color.
|
DarkRoyal
|
Numeric value representing the dark royal blue color.
|
DarkViolet
|
Numeric value representing the dark violet color.
|
DarkYellow
|
Numeric value representing the dark yellow color.
|
Default
|
Numeric value representing the "default color" of whatever it's applied to.
|
Gray
|
Numeric value representing the gray color.
|
Green
|
Numeric value representing the green color.
|
LightGray
|
Numeric value representing the light gray color.
|
Magenta
|
Numeric value representing the magenta color.
|
Orange
|
Numeric value representing the orange color.
|
Pink
|
Numeric value representing the pink color.
|
Purple
|
Numeric value representing the purple color.
|
Red
|
Numeric value representing the red color.
|
Royal
|
Numeric value representing the royal blue color.
|
SoftBlue
|
Numeric value representing a soft blue color.
|
SoftCyan
|
Numeric value representing a soft cyan color.
|
SoftGreen
|
Numeric value representing a soft green color.
|
SoftMagenta
|
Numeric value representing a soft magenta color.
|
SoftOrange
|
Numeric value representing a soft orange color.
|
SoftPurple
|
Numeric value representing a soft purple color.
|
SoftRed
|
Numeric value representing a soft red color.
|
SoftRoyal
|
Numeric value representing a soft royal blue color.
|
SoftViolet
|
Numeric value representing a soft violet color.
|
SoftYellow
|
Numeric value representing a soft yellow color.
|
Transparent
|
Numeric value indicating that the object is to be drawn transparently, if supported.
|
Violet
|
Numeric value representing the purple color.
|
White
|
Numeric value representing the white color.
|
Yellow
|
Numeric value representing the yellow color.
|
Statische Methoden
Blend
|
Blends the Source color into the Destination color, according to the alpha channel of both colors,
and returns the resulting color.
|
Darker
|
Returns a darker version of a color.
|
Desaturate
|
Return the specified color desaturated, i.e. grayed.
|
Distance
|
Return the RGB distance between two colors as a floating point number between 0.0 and 1.0 .
|
GetAlpha
|
Return the alpha component of the specified color.
|
Gradient
|
Return a color that is the RGB mean between Color1 and Color2
|
HSV
|
Returns a color value from its hue, saturation, value and alpha components.
|
Invert
|
Invert a color and return it.
|
Lighter
|
Returns a lighter version of a color.
|
Merge
|
Returns a mix between Color1 and Color2.
|
RGB
|
Returns a color value from its red, green, blue and alpha components.
|
SetAlpha
|
Change the alpha component of a color and return it.
|
SetHSV
|
Set the HSVA components of the specified color and returns it as an integer value.
|
SetRGB
|
Set the RGBA components of the specified color and returns it as an integer value.
|
ToHTML
|
Return the HTML representation of the color.
|
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