AngleSharp by AngleSharp

<PackageReference Include="AngleSharp" Version="0.9.3" />

 Color

Represents a color value.
public static readonly Color Black

The color #000000.

public static readonly Color Blue

The color #0000FF.

public static readonly Color Green

The color #008000.

public static readonly Color Magenta

The color #FF00FF.

public static readonly Color PureGreen

The color #00FF00.

public static readonly Color Red

The color #FF0000.

public static readonly Color Transparent

The color #00000000.

public static readonly Color White

The color #FFFFFF.

public byte A { get; }

Gets the alpha part of the color.

public double Alpha { get; }

Gets the alpha part of the color in percent (0..1).

public byte B { get; }

Gets the blue part of the color.

public byte G { get; }

Gets the green part of the color.

public byte R { get; }

Gets the red part of the color.

public int Value { get; }

Gets the Int32 value of the color.

public Color(byte r, byte g, byte b)

Creates a CSS color type without any transparency (alpha = 100%).

public Color(byte r, byte g, byte b, byte a)

Creates a CSS color type.

public Color(byte r, byte g, byte b, double a)

Creates a CSS color type.

public static Color FromFlexHex(string color)

Returns the color of non-CSS colors in a special IE notation known as "flex hex". Computes the part without the hash and possible color names. More information can be found at: http://scrappy-do.blogspot.de/2004/08/little-rant-about-microsoft-internet.html

public static Color FromHex(string color)

Returns the color from the given hex string.

public static Color FromHsl(float h, float s, float l)

Returns the color that represents the given HSL values.

public static Color FromHsla(float h, float s, float l, float alpha)

Returns the color that represents the given HSL values.

public static Color? FromName(string name)

Returns the color with the given name.

public static Color FromRgb(byte r, byte g, byte b)

Returns the color from the given primitives without any alpha (non-transparent).

public static Color FromRgba(byte r, byte g, byte b, double a)

Returns the color from the given primitives.

public static Color Mix(Color above, Color below)

Mixes two colors using alpha compositing as described here: http://en.wikipedia.org/wiki/Alpha_compositing

public static Color Mix(double alpha, Color above, Color below)

Mixes two colors using alpha compositing as described here: http://en.wikipedia.org/wiki/Alpha_compositing

public static bool op_Equality(Color a, Color b)

Compares two colors and returns a boolean indicating if the two do match.

public static bool op_Inequality(Color a, Color b)

Compares two colors and returns a boolean indicating if the two do not match.

public static bool TryFromHex(string color, out Color value)

Returns the color from the given hex string if it can be converted, otherwise the color is not set.

public bool Equals(Color other)

Checks two colors for equality.

public string ToString(string format, IFormatProvider formatProvider)

Returns a formatted string representing the length.