Table of Contents

Class Color

Namespace
DotNetBrowser.Ui
Assembly
DotNetBrowser.dll

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.

public sealed class Color : IFormattable
Inheritance
Color
Implements
Inherited Members

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.

Constructors

Color(float, float, float, float)

Initializes a new Color instance with the specified channel values.

Properties

Alpha

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.

Blue

Gets the blue channel value in the 0..1 range.

Green

Gets the green channel value in the 0..1 range.

Red

Gets the red channel value in the 0..1 range.

Methods

Equals(object)
GetHashCode()
ToHexRGB()

Creates a string representation for this color in the RGB hex format.

ToHexRGBA()

Creates a string representation for this color in the RGBA hex format.

ToString()
ToString(string)

Returns a string representation of the value of this Color instance, according to the provided format specifier.

ToString(string, IFormatProvider)