New to Telerik Document ProcessingStart a free 30-day trial

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:

C#
public class GrayColor : SimpleColor, IEquatable<ColorBase>

Inheritance: objectColorBaseSimpleColorGrayColor

Implements: IEquatable<ColorBase>

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

Constructors

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

C#
public GrayColor()

Creates a GrayColor from a gray value.

C#
public GrayColor(byte g)
Parameters:gbyte

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

Fields

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

C#
public byte G
Field Value:

The gray component value.

Methods

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

C#
public override bool Equals(ColorBase other)
Parameters:otherColorBase

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)

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

C#
public override string ToString()
Returns:

string

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

Overrides: object.ToString()