Table of Contents

Struct XColor

Namespace
PdfSharp.Drawing
Assembly
PdfSharp.dll

Represents an RGB, CMYK, or gray scale color.

public struct XColor

Fields

Empty

Represents the empty color.

Properties

A

Gets or sets the alpha value the specifies the transparency. The value is in the range from 1 (opaque) to 0 (completely transparent).

B

Gets or sets the blue value.

C

Gets or sets the cyan value.

ColorSpace

Gets or sets the color space to be used for PDF generation.

G

Gets or sets the green value.

GS

Gets or sets the gray scale value.

IsEmpty

Indicates whether this XColor structure is uninitialized.

IsKnownColor

Gets a value indicating whether this color is a known color.

K

Gets or sets the black (or key) value.

M

Gets or sets the magenta value.

R

Gets or sets the red value.

Y

Gets or sets the yellow value.

Methods

Equals(object?)

Determines whether the specified object is a Color structure and is equivalent to this Color structure.

FromArgb(int)

Creates an XColor structure from a 32-bit ARGB value.

FromArgb(int, XColor)

Creates an XColor structure from the specified alpha value and color.

FromArgb(int, int, int)

Creates an XColor structure from the specified 8-bit color values (red, green, and blue). The alpha value is implicitly 255 (fully opaque).

FromArgb(int, int, int, int)

Creates an XColor structure from the four ARGB component (alpha, red, green, and blue) values.

FromArgb(uint)

Creates an XColor structure from a 32-bit ARGB value.

FromCmyk(double, double, double, double)

Creates an XColor structure from the specified CMYK values.

FromCmyk(double, double, double, double, double)

Creates an XColor structure from the specified CMYK values.

FromGrayScale(double)

Creates an XColor structure from the specified gray value.

FromKnownColor(XKnownColor)

Creates an XColor from the specified pre-defined color.

FromName(string)

Creates an XColor from the specified name of a pre-defined color.

GetBrightness()

Gets the hue-saturation-brightness (HSB) brightness value for this color.

GetHashCode()

Returns the hash code for this instance.

GetHue()

Gets the hue-saturation-brightness (HSB) hue value, in degrees, for this color.

GetSaturation()

Gets the hue-saturation-brightness (HSB) saturation value for this color.

Operators

operator ==(XColor, XColor)

Determines whether two colors are equal.

operator !=(XColor, XColor)

Determines whether two colors are not equal.