CssRgb Class

rgb() and rgba() (https://drafts.css-houdini.org/css-typed-om-1/#cssrgb).

public sealed class CssRgb : CssColorValue
Inheritance
CssColorValue CssRgb

Constructors

NameDescription
CssRgb(CssColorChannel, CssColorChannel, CssColorChannel, CssColorChannel?)https://drafts.css-houdini.org/css-typed-om-1/#dom-cssrgb-cssrgb

CssRgb(CssColorChannel, CssColorChannel, CssColorChannel, CssColorChannel?)

CssColorValue.cs

https://drafts.css-houdini.org/css-typed-om-1/#dom-cssrgb-cssrgb

public CssRgb(CssColorChannel r, CssColorChannel g, CssColorChannel b, CssColorChannel? alpha = null)

Properties

NameDescription
AlphaGets or sets the alpha (opacity) channel of the rgb() color.
BGets or sets the blue channel of the rgb() color.
GGets or sets the green channel of the rgb() color.
RGets or sets the red channel of the rgb() color.

Gets or sets the alpha (opacity) channel of the rgb() color.

public CssColorChannel Alpha { get; set; }

Gets or sets the blue channel of the rgb() color.

public CssColorChannel B { get; set; }

Gets or sets the green channel of the rgb() color.

public CssColorChannel G { get; set; }

Gets or sets the red channel of the rgb() color.

public CssColorChannel R { get; set; }

Methods

NameDescription
ToString()The serialization of the value (https://drafts.css-houdini.org/css-typed-om-1/#stylevalue-serialization).

The serialization of the value (https://drafts.css-houdini.org/css-typed-om-1/#stylevalue-serialization).

public override string ToString()

Returns

string