Click or drag to resize

Color Class

A numeric model of an RGB color. The components of the color instance are presented in the arithmetic notation. This means that each component accepts any fractional value from 0 to 1.
Inheritance Hierarchy
SystemObject
  DotNetBrowser.UiColor

Namespace:  DotNetBrowser.Ui
Assembly:  DotNetBrowser (in DotNetBrowser.dll) Version: 2.27.7
Syntax
C#
public sealed class Color : IFormattable

The Color type exposes the following members.

Constructors
  NameDescription
Public methodColor
Initializes a new Color instance with the specified channel values.
Top
Properties
  NameDescription
Public propertyAlpha
Gets the opacity channel value in the 0..1 range. When the value is 1, the color is 100% opaque. When 0, the color is 100% transparent.
Public propertyBlue
Gets the blue channel value in the 0..1 range.
Public propertyGreen
Gets the green channel value in the 0..1 range.
Public propertyRed
Gets the red channel value in the 0..1 range.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Overrides ObjectEquals(Object).)
Public methodGetHashCode
Serves as the default hash function.
(Overrides ObjectGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToHexRGB
Creates a string representation for this color in the RGB hex format.
Public methodToHexRGBA
Creates a string representation for this color in the RGBA hex format.
Public methodToString
Returns a string that represents the current object.
(Overrides ObjectToString.)
Public methodToString(String)
Returns a string representation of the value of this Color instance, according to the provided format specifier.
Public methodToString(String, IFormatProvider)
Formats the value of the current instance using the specified format.
Top
Extension Methods
  NameDescription
Public Extension MethodToColorOverloaded.
Converts the Color instance to Color.
(Defined by ColorExtensions.)
Public Extension MethodToColorOverloaded.
Converts the Color instance to Color.
(Defined by ColorExtensions.)
Top
Remarks

If all the components except alpha are at zero and the alpha is at 1, the result is black. If all are at 1, the result is the brightest representable white.

Important: the component values out of the 0..1 range are not allowed and should not be used.

See Also