Click or drag to resize

Color Structure

Represents a color.

Namespace:  GemBox.Presentation
Assembly:  GemBox.Presentation (in GemBox.Presentation.dll) Version: 21.3.35.1045 (21.3.35.1045)
Syntax
public struct Color : IEquatable<Color>

The Color type exposes the following members.

Properties
  NameDescription
Public propertyA
Gets the color opacity (0 = fully transparent, 255 = fully opaque).
Public propertyArgb
Gets the Opacity, Red, Green and Blue components in a single Int32 value.
Public propertyB
Gets the Blue component (from 0 to 255).
Public propertyG
Gets the Green component (from 0 to 255).
Public propertyName
Gets the color name.
Public propertyR
Gets the Red component (from 0 to 255).
Top
Methods
  NameDescription
Public methodEquals(Object)
Determines whether the specified Object is equal to this Color instance.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Color)
Determines whether the other Color is equal to this Color instance.
Public methodStatic memberFromHsl(Int32, Int32, Int32)
Creates a new color instance from the specified Hue, Saturation and Lightness components.
Public methodStatic memberFromHsl(Int32, Int32, Int32, Double)
Creates a new color instance from the specified Hue, Saturation and Lightness components and transparency.
Public methodStatic memberFromName(ColorName)
Creates a new color instance from the specified color name.
Public methodStatic memberFromName(ColorName, Double)
Creates a new color instance from the specified color name and luminance.
Public methodStatic memberFromName(ColorName, Double, Double)
Creates a new color instance from the specified color name, luminance and transparency.
Public methodStatic memberFromRgb(Int32, Int32, Int32)
Creates a new color instance from the specified Red, Green and Blue components.
Public methodStatic memberFromRgb(Int32, Int32, Int32, Double)
Creates a new color instance from the specified Red, Green and Blue components and transparency.
Public methodGetHashCode
Returns a hash code for this Color instance.
(Overrides ValueTypeGetHashCode.)
Public methodToString
Returns a String that represents this Color instance.
(Overrides ValueTypeToString.)
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Determines whether first and second Colors are equal.
Public operatorStatic memberInequality
Determines whether first and second Colors are not equal.
Top
See Also