Avalonia Code OnlyItaliano

API › RAVAL

RColor class

public static class RColor

Color conversions and the palette of the series.

Methods

static Color Mix(Color a, Color b, double t)

The color between a and b: 0 gives a, 1 gives b (opacity included).

static Color Lighten(Color c, double amount)

The color mixed with white by the given amount (0-1).

static Color Darken(Color c, double amount)

The color mixed with black by the given amount (0-1).

static Color WithOpacity(Color c, double opacity)

The same color with the given opacity (0-1).

static string Hex(Color c)

The color as HTML text: «#1a7fb5», or «#801a7fb5».

static double Luminance(Color c)

The relative luminance (0 black, 1 white) of WCAG 2: whether a text on this color should be dark or light.

static IBrush Series(int i)

The brush of the i-th series (the palette repeats).

Fields

static readonly Color[] Palette

The colors of the series, in order.