Struct Color
Represents a single RGB color value.
Implements
IEquatable<Color>
Namespace: MarcusW.VncClient
Assembly: MarcusW.VncClient.dll
Syntax
public struct Color : IEquatable<Color>
Constructors
| Improve this Doc View SourceColor(Byte, Byte, Byte)
Initializes a new instance of the Color structure.
Declaration
public Color(byte r, byte g, byte b)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte | r | The red value. |
| System.Byte | g | The green value. |
| System.Byte | b | The blue value. |
Properties
| Improve this Doc View SourceB
Gets the blue value.
Declaration
public byte B { get; }
Property Value
| Type | Description |
|---|---|
| System.Byte |
G
Gets the green value.
Declaration
public byte G { get; }
Property Value
| Type | Description |
|---|---|
| System.Byte |
R
Gets the red value.
Declaration
public byte R { get; }
Property Value
| Type | Description |
|---|---|
| System.Byte |
Methods
| Improve this Doc View SourceEquals(Color)
Declaration
public bool Equals(Color other)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | other |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Equals(Nullable<Object>)
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<System.Object> | obj |
Returns
| Type | Description |
|---|---|
| System.Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 |
ToPlainPixel()
Returns the pixel data for this color using the Plain encoding.
Declaration
public uint ToPlainPixel()
Returns
| Type | Description |
|---|---|
| System.UInt32 | The pixel data. |
ToString()
Returns the string representation of the color.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | The string representation of the color. |
Operators
| Improve this Doc View SourceEquality(Color, Color)
Checks for equality between two Colors.
Declaration
public static bool operator ==(Color left, Color right)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | left | The first color. |
| Color | right | The second color. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the colors are equal, otherwise false. |
Inequality(Color, Color)
Checks for inequality between two Colors.
Declaration
public static bool operator !=(Color left, Color right)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | left | The first color. |
| Color | right | The second color. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the colors are unequal, otherwise false. |
Implements
IEquatable<>