Table of Contents

Class CssColor

Namespace
SharpVectors.Dom.Css
Assembly
SharpVectors.Css.dll

The RGB-Color interface is used to represent any RGB color value.

public sealed class CssColor : ICssColor
Inheritance
CssColor
Implements
Inherited Members

Remarks

This interface reflects the values in the underlying style property. Hence, modifications made to the CSSPrimitiveValue objects modify the style property. A specified RGB color is not clipped (even if the number is outside the range 0-255 or 0%-100%).

A computed RGB color is clipped depending on the device. Even if a style sheet can only contain an integer for a color value, the internal storage of this integer is a float, and this can be used as a float in the specified or the computed style.

A color percentage value can always be converted to a number and vice versa.

Constructors

CssColor(int, int, int)

Constructs a RgbColor based on the GDI color

CssColor(int, int, int, int)

Constructs a RgbColor based on the GDI color

CssColor(string)

Parses a constructs a RgbColor

Properties

Alpha

This attribute is used for the alpha value of the RGBA color

Blue

This attribute is used for the blue value of the RGB color

CssText
Green

This attribute is used for the green value of the RGB color.

HasAlpha

Gets a value which indicates whether the color value has alpha value or not.

IsSystemColor

Gets a value which indicates whether the color is system-defined color.

IsVarColor

Gets a value which indicates whether the color is defined by custom properties.

Name

Gets the name of the color, if available.

Red

This attribute is used for the red value of the RGB color