Color Struct
Namespace: System.Drawing · Assembly: GHIElectronics.TinyCLR.Drawing
32-bit ARGB color value. Construct via FromArgb(int, int, int) / FromArgb(int, int, int, int), or use one of the named static constants.
public struct Color
Properties
Transparent
public static Color Transparent { get; }
No description available.
Black
public static Color Black { get; }
No description available.
White
public static Color White { get; }
No description available.
Gray
public static Color Gray { get; }
No description available.
Red
public static Color Red { get; }
No description available.
Green
public static Color Green { get; }
No description available.
Blue
public static Color Blue { get; }
No description available.
Yellow
public static Color Yellow { get; }
No description available.
Purple
public static Color Purple { get; }
No description available.
Teal
public static Color Teal { get; }
No description available.
R
public byte R { get; }
No description available.
G
public byte G { get; }
No description available.
B
public byte B { get; }
No description available.
A
public byte A { get; }
No description available.
IsEmpty
public bool IsEmpty { get; }
No description available.
Name
public string Name { get; }
The native API name. (inherited)
Methods
Color()
public static readonly Color Empty = new Color()
No description available.
Returns Color Empty = new
FromArgb(int argb)
public static Color FromArgb(int argb)
No description available.
| Parameter | Type | Description |
|---|---|---|
argb | int |
Returns Color
FromArgb(int red, int green, int blue)
public static Color FromArgb(int red, int green, int blue)
No description available.
| Parameter | Type | Description |
|---|---|---|
red | int | |
green | int | |
blue | int |
Returns Color
FromArgb(int alpha, int red, int green, int blue)
public static Color FromArgb(int alpha, int red, int green, int blue)
No description available.
| Parameter | Type | Description |
|---|---|---|
alpha | int | |
red | int | |
green | int | |
blue | int |
Returns Color
FromArgb(int alpha, Color baseColor)
public static Color FromArgb(int alpha, Color baseColor)
No description available.
| Parameter | Type | Description |
|---|---|---|
alpha | int | |
baseColor | Color |
Returns Color
GetBrightness()
public float GetBrightness()
No description available.
Returns float
GetHue()
public float GetHue()
No description available.
Returns float
GetSaturation()
public float GetSaturation()
No description available.
Returns float
ToArgb()
public int ToArgb()
No description available.
Returns int
ToString()
public override string ToString()
String representation (inherited)
Returns string
==(Color left, Color right)
public static bool operator ==(Color left, Color right)
Equals operator overload (inherited)
| Parameter | Type | Description |
|---|---|---|
left | Color | |
right | Color |
Returns bool operator
!=(Color left, Color right)
public static bool operator !=(Color left, Color right)
NotEquals operator overload (inherited)
| Parameter | Type | Description |
|---|---|---|
left | Color | |
right | Color |
Returns bool operator
GetHashCode()
public override int GetHashCode()
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table (inherited)
Returns int
Equals(object obj)
public override bool Equals(object obj)
Is the given RoutedEventHandlerInfo equals the current (inherited)
| Parameter | Type | Description |
|---|---|---|
obj | object |
Returns bool
Convert(byte[] inArray, byte[] outArray, ColorFormat colorFormat)
public static void Convert(byte[] inArray, byte[] outArray, ColorFormat colorFormat)
No description available.
| Parameter | Type | Description |
|---|---|---|
inArray | byte[] | |
outArray | byte[] | |
colorFormat | ColorFormat |
Convert(byte[] inArray, byte[] outArray, ColorFormat colorFormat, RgbFormat rgbFormat)
public static void Convert(byte[] inArray, byte[] outArray, ColorFormat colorFormat, RgbFormat rgbFormat)
No description available.
| Parameter | Type | Description |
|---|---|---|
inArray | byte[] | |
outArray | byte[] | |
colorFormat | ColorFormat | |
rgbFormat | RgbFormat |
Convert(byte[] inArray, byte[] outArray, ColorFormat colorFormat, RgbFormat rgbFormat, byte alpha)
public static void Convert(byte[] inArray, byte[] outArray, ColorFormat colorFormat, RgbFormat rgbFormat, byte alpha)
No description available.
| Parameter | Type | Description |
|---|---|---|
inArray | byte[] | |
outArray | byte[] | |
colorFormat | ColorFormat | |
rgbFormat | RgbFormat | |
alpha | byte |
Convert(byte[] inArray, byte[] outArray, ColorFormat colorFormat, RgbFormat rgbFormat, byte alpha, byte[] colorTable)
public static void Convert(byte[] inArray, byte[] outArray, ColorFormat colorFormat, RgbFormat rgbFormat, byte alpha, byte[] colorTable)
No description available.
| Parameter | Type | Description |
|---|---|---|
inArray | byte[] | |
outArray | byte[] | |
colorFormat | ColorFormat | |
rgbFormat | RgbFormat | |
alpha | byte | |
colorTable | byte[] |
ConvertTo1Bpp(byte[] inArray, byte[] outArray, uint width)
public static void ConvertTo1Bpp(byte[] inArray, byte[] outArray, uint width)
No description available.
| Parameter | Type | Description |
|---|---|---|
inArray | byte[] | |
outArray | byte[] | |
width | uint |
ConvertTo1Bpp(byte[] inArray, byte[] outArray, uint width, BitFormat bitFormat)
public static void ConvertTo1Bpp(byte[] inArray, byte[] outArray, uint width, BitFormat bitFormat)
No description available.
| Parameter | Type | Description |
|---|---|---|
inArray | byte[] | |
outArray | byte[] | |
width | uint | |
bitFormat | BitFormat |