Struct Color
Represents a graphic color.
Implements
Inherited Members
Namespace: TopSolid.Kernel.Automating
Assembly: cs.temp.dll.dll
Syntax
[AvailableSinceVersion(7, 6, 0, 0)]
public struct Color : IEquatable<Color>
Remarks
This structure is available since v7.6.
Constructors
Color(Byte, Byte, Byte)
Initializes a new instance of the Color structure with its RGB intensities.
Declaration
public Color(byte inR, byte inG, byte inB)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | inR | Red intensity. |
System.Byte | inG | Green intensity. |
System.Byte | inB | Blue intensity. |
Fields
Black
Black color.
Declaration
public static readonly Color Black
Field Value
Type | Description |
---|---|
Color |
Blue
Blue color.
Declaration
public static readonly Color Blue
Field Value
Type | Description |
---|---|
Color |
Cyan
Cyan color.
Declaration
public static readonly Color Cyan
Field Value
Type | Description |
---|---|
Color |
DarkBlue
Dark blue color.
Declaration
public static readonly Color DarkBlue
Field Value
Type | Description |
---|---|
Color |
DarkCyan
Dark cyan color.
Declaration
public static readonly Color DarkCyan
Field Value
Type | Description |
---|---|
Color |
DarkGray
Dark gray color.
Declaration
public static readonly Color DarkGray
Field Value
Type | Description |
---|---|
Color |
DarkGreen
Dark green color.
Declaration
public static readonly Color DarkGreen
Field Value
Type | Description |
---|---|
Color |
Empty
Empty color.
Declaration
public static readonly Color Empty
Field Value
Type | Description |
---|---|
Color |
Gray
Gray color.
Declaration
public static readonly Color Gray
Field Value
Type | Description |
---|---|
Color |
Green
Green color.
Declaration
public static readonly Color Green
Field Value
Type | Description |
---|---|
Color |
LightBlue
Light blue color.
Declaration
public static readonly Color LightBlue
Field Value
Type | Description |
---|---|
Color |
LightGray
Light gray color.
Declaration
public static readonly Color LightGray
Field Value
Type | Description |
---|---|
Color |
LightGreen
Light green color.
Declaration
public static readonly Color LightGreen
Field Value
Type | Description |
---|---|
Color |
LightYellow
Lights yellow color.
Declaration
public static readonly Color LightYellow
Field Value
Type | Description |
---|---|
Color |
Magenta
Magenta color.
Declaration
public static readonly Color Magenta
Field Value
Type | Description |
---|---|
Color |
Orange
Orange color.
Declaration
public static readonly Color Orange
Field Value
Type | Description |
---|---|
Color |
Pink
Pink color.
Declaration
public static readonly Color Pink
Field Value
Type | Description |
---|---|
Color |
Red
Red color.
Declaration
public static readonly Color Red
Field Value
Type | Description |
---|---|
Color |
Violet
Violet color.
Declaration
public static readonly Color Violet
Field Value
Type | Description |
---|---|
Color |
White
White color.
Declaration
public static readonly Color White
Field Value
Type | Description |
---|---|
Color |
Yellow
Yellow color.
Declaration
public static readonly Color Yellow
Field Value
Type | Description |
---|---|
Color |
Properties
B
Gets the color blue intensity.
Declaration
public readonly byte B { get; }
Property Value
Type | Description |
---|---|
System.Byte |
G
Gets the color green intensity.
Declaration
public readonly byte G { get; }
Property Value
Type | Description |
---|---|
System.Byte |
IsEmpty
Tells whether the color is empty.
Declaration
public readonly bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
R
Gets the color red intensity.
Declaration
public readonly byte R { get; }
Property Value
Type | Description |
---|---|
System.Byte |
Methods
Equals(Object)
Declaration
public override bool Equals(object inObj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | inObj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Equals(Color)
Declaration
public bool Equals(Color inOther)
Parameters
Type | Name | Description |
---|---|---|
Color | inOther |
Returns
Type | Description |
---|---|
System.Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
Operators
Equality(Color, Color)
Compares two colors.
Declaration
public static bool operator ==(Color inC1, Color inC2)
Parameters
Type | Name | Description |
---|---|---|
Color | inC1 | Left hand side color. |
Color | inC2 | Right hand side color. |
Returns
Type | Description |
---|---|
System.Boolean | Colors are equal. |
Inequality(Color, Color)
Compares two colors.
Declaration
public static bool operator !=(Color inC1, Color inC2)
Parameters
Type | Name | Description |
---|---|---|
Color | inC1 | Left hand side color. |
Color | inC2 | Right hand side color. |
Returns
Type | Description |
---|---|
System.Boolean | Colors are different. |