Class
GrayColor

Device grayscale color with a single component representing the gray value.

Definition

Namespace:Telerik.Windows.Documents.Fixed.Model.ColorSpaces

Assembly:Telerik.Windows.Documents.Fixed.dll

Syntax:

cs-api-definition
public class GrayColor : SimpleColor, IEquatable<ColorBase>

Inheritance: objectColorBaseSimpleColorGrayColor

Implements: IEquatable<ColorBase>

Inherited Members ColorBase.Equals(object)ColorBase.GetHashCode()

Constructors

GrayColor()

Creates a GrayColor with the gray component set to 0 (black).

Declaration

cs-api-definition
public GrayColor()

GrayColor(byte)

Creates a GrayColor from a gray value.

Declaration

cs-api-definition
public GrayColor(byte g)

Parameters

g

byte

The gray component value (0-255), where 0 is black and 255 is white.

Fields

G

Gets or sets the gray component, 0–255 (0 = black, 255 = white).

Declaration

cs-api-definition
public byte G

Field Value

byte

The gray component value.

Methods

Equals(ColorBase)

Determines whether the specified ColorBase is equal to the current GrayColor.

Declaration

cs-api-definition
public override bool Equals(ColorBase other)

Parameters

other

ColorBase

The ColorBase to compare with the current instance.

Returns

bool

true if the specified color is a GrayColor with the same gray component; otherwise, false.

Overrides ColorBase.Equals(ColorBase)

ToString()

Returns a string representation of this gray color showing its component value.

Declaration

cs-api-definition
public override string ToString()

Returns

string

A string in the format "<G=value>".

Overrides object.ToString()