VectSharp 2.6.1
A light library for C# vector graphics
Loading...
Searching...
No Matches
VectSharp.Gradients Class Reference

Standard gradients. More...

Static Public Member Functions

static Colour MagmaColouring (double x)
 Magma colour map, based on the homonymous colour scale included in the "viridis" R package (). More...
 
static Colour InfernoColouring (double x)
 Inferno colour map, based on the homonymous colour scale included in the "viridis" R package (). More...
 
static Colour PlasmaColouring (double x)
 Plasma colour map, based on the homonymous colour scale included in the "viridis" R package (). More...
 
static Colour ViridisColouring (double x)
 Viridis colour map, based on the homonymous colour scale included in the "viridis" R package (). More...
 
static Colour CividisColouring (double x)
 Cividis colour map, based on the homonymous colour scale included in the "viridis" R package (). More...
 
static Colour RocketColouring (double x)
 Rocket colour map, based on the homonymous colour scale included in the "viridis" R package (). More...
 
static Colour MakoColouring (double x)
 Mako colour map, based on the homonymous colour scale included in the "viridis" R package (). More...
 
static Colour TurboColouring (double x)
 Turbo colour map, based on the homonymous colour scale included in the "viridis" R package (). More...
 

Static Public Attributes

static readonly GradientStops TransparentToBlack = new GradientStops(new GradientStop(Colour.FromRgba(0, 0, 0, 0), 0), new GradientStop(Colour.FromRgb(0, 0, 0), 1))
 Gradient from transparent black (0) to opaque black (1). More...
 
static readonly GradientStops WhiteToBlack = new GradientStops(new GradientStop(Colour.FromRgb(255, 255, 255), 0), new GradientStop(Colour.FromRgb(0, 0, 0), 1))
 Gradient from white (0) to black (1). More...
 
static readonly GradientStops RedToGreen = new GradientStops(new GradientStop(Colour.FromRgb(237, 28, 36), 0), new GradientStop(Colour.FromRgb(34, 177, 76), 1))
 Gradient from red (0) to green (1). More...
 
static readonly GradientStops Rainbow = new GradientStops(new GradientStop(Colour.FromRgb(237, 28, 36), 0), new GradientStop(Colour.FromRgb(255, 127, 39), 1.0 / 6), new GradientStop(Colour.FromRgb(255, 242, 0), 1.0 / 3), new GradientStop(Colour.FromRgb(34, 177, 76), 0.5), new GradientStop(Colour.FromRgb(0, 162, 232), 2.0 / 3), new GradientStop(Colour.FromRgb(63, 72, 204), 5.0 / 6), new GradientStop(Colour.FromRgb(163, 73, 164), 1))
 Rainbow gradient (red, orange, yellow, green, blue, indigo, violet). More...
 
static readonly GradientStops RedYellowGreen = new GradientStops(new GradientStop(Colour.FromRgb(237, 28, 36), 0), new GradientStop(Colour.FromRgb(255, 242, 0), 0.5), new GradientStop(Colour.FromRgb(34, 177, 76), 1))
 Gradient from red (0) to yellow (0.5) to green (1). More...
 
static readonly GradientStops OkabeItoRainbow = new GradientStops(new GradientStop(Colour.FromRgb(204, 121, 167), 0), new GradientStop(Colour.FromRgb(213, 94, 0), 1.0 / 6), new GradientStop(Colour.FromRgb(230, 159, 0), 1.0 / 3), new GradientStop(Colour.FromRgb(240, 228, 66), 0.5), new GradientStop(Colour.FromRgb(0, 158, 115), 2.0 / 3), new GradientStop(Colour.FromRgb(0, 114, 178), 5.0 / 6), new GradientStop(Colour.FromRgb(86, 180, 233), 1))
 Rainbow gradient with Okabe-Ito colour-blind safe colours (). More...
 
static readonly GradientStops OkabeItoRainbowDiscrete = new GradientStops(new GradientStop(Colour.FromRgb(204, 121, 167), 0), new GradientStop(Colour.FromRgb(204, 121, 167), 0.2), new GradientStop(Colour.FromRgb(230, 159, 0), 0.201), new GradientStop(Colour.FromRgb(230, 159, 0), 0.4), new GradientStop(Colour.FromRgb(0, 158, 115), 0.401), new GradientStop(Colour.FromRgb(0, 158, 115), 0.6), new GradientStop(Colour.FromRgb(0, 114, 178), 0.601), new GradientStop(Colour.FromRgb(0, 114, 178), 0.8), new GradientStop(Colour.FromRgb(86, 180, 233), 0.801), new GradientStop(Colour.FromRgb(86, 180, 233), 1))
 Rainbow gradient with Okabe-Ito colour-blind safe colours () in discrete steps. More...
 
static readonly GradientStops MutedRainbow = new GradientStops(new GradientStop(Colour.FromRgb(221, 204, 119), 0), new GradientStop(Colour.FromRgb(153, 153, 51), 0.125), new GradientStop(Colour.FromRgb(17, 119, 51), 0.25), new GradientStop(Colour.FromRgb(68, 170, 153), 0.375), new GradientStop(Colour.FromRgb(136, 204, 238), 0.5), new GradientStop(Colour.FromRgb(51, 34, 136), 0.625), new GradientStop(Colour.FromRgb(170, 68, 153), 0.75), new GradientStop(Colour.FromRgb(136, 34, 85), 0.875), new GradientStop(Colour.FromRgb(204, 102, 119), 1))
 Rainbow gradient with Paul Tol's Muted palette (). More...
 
static readonly GradientStops MutedRainbowDiscrete = new GradientStops(new GradientStop(Colour.FromRgb(187, 187, 187), 0.101), new GradientStop(Colour.FromRgb(187, 187, 187), 0.1), new GradientStop(Colour.FromRgb(221, 204, 119), 0.101), new GradientStop(Colour.FromRgb(221, 204, 119), 0.2), new GradientStop(Colour.FromRgb(153, 153, 51), 0.201), new GradientStop(Colour.FromRgb(153, 153, 51), 0.3), new GradientStop(Colour.FromRgb(17, 119, 51), 0.301), new GradientStop(Colour.FromRgb(17, 119, 51), 0.4), new GradientStop(Colour.FromRgb(68, 170, 153), 0.401), new GradientStop(Colour.FromRgb(68, 170, 153), 0.5), new GradientStop(Colour.FromRgb(136, 204, 238), 0.501), new GradientStop(Colour.FromRgb(136, 204, 238), 0.6), new GradientStop(Colour.FromRgb(51, 34, 136), 0.601), new GradientStop(Colour.FromRgb(51, 34, 136), 0.7), new GradientStop(Colour.FromRgb(170, 68, 153), 0.701), new GradientStop(Colour.FromRgb(170, 68, 153), 0.8), new GradientStop(Colour.FromRgb(136, 34, 85), 0.801), new GradientStop(Colour.FromRgb(136, 34, 85), 0.9), new GradientStop(Colour.FromRgb(204, 102, 119), 0.901), new GradientStop(Colour.FromRgb(204, 102, 119), 1))
 Rainbow gradient with Paul Tol's Muted palette () in discrete steps. More...
 
static readonly GradientStops Magma = new GradientStops(from el in Enumerable.Range(0, 21) let ind = (int)Math.Round(12.75 * el) select new GradientStop(Colour.FromRgb(MagmaRGB[ind, 0], MagmaRGB[ind, 1], MagmaRGB[ind, 2]), el * 0.05))
 Magma gradient, based on the homonymous colour scale included in the "viridis" R package (). More...
 
static readonly GradientStops Inferno = new GradientStops(from el in Enumerable.Range(0, 21) let ind = (int)Math.Round(12.75 * el) select new GradientStop(Colour.FromRgb(InfernoRGB[ind, 0], InfernoRGB[ind, 1], InfernoRGB[ind, 2]), el * 0.05))
 Inferno gradient, based on the homonymous colour scale included in the "viridis" R package (). More...
 
static readonly GradientStops Plasma = new GradientStops(from el in Enumerable.Range(0, 21) let ind = (int)Math.Round(12.75 * el) select new GradientStop(Colour.FromRgb(PlasmaRGB[ind, 0], PlasmaRGB[ind, 1], PlasmaRGB[ind, 2]), el * 0.05))
 Plasma gradient, based on the homonymous colour scale included in the "viridis" R package (). More...
 
static readonly GradientStops Viridis = new GradientStops(from el in Enumerable.Range(0, 21) let ind = (int)Math.Round(12.75 * el) select new GradientStop(Colour.FromRgb(ViridisRGB[ind, 0], ViridisRGB[ind, 1], ViridisRGB[ind, 2]), el * 0.05))
 Viridis gradient, based on the homonymous colour scale included in the "viridis" R package (). More...
 
static readonly GradientStops Cividis = new GradientStops(from el in Enumerable.Range(0, 21) let ind = (int)Math.Round(12.75 * el) select new GradientStop(Colour.FromRgb(CividisRGB[ind, 0], CividisRGB[ind, 1], CividisRGB[ind, 2]), el * 0.05))
 Cividis gradient, based on the homonymous colour scale included in the "viridis" R package (). More...
 
static readonly GradientStops Rocket = new GradientStops(from el in Enumerable.Range(0, 21) let ind = (int)Math.Round(12.75 * el) select new GradientStop(Colour.FromRgb(RocketRGB[ind, 0], RocketRGB[ind, 1], RocketRGB[ind, 2]), el * 0.05))
 Rocket gradient, based on the homonymous colour scale included in the "viridis" R package (). More...
 
static readonly GradientStops Mako = new GradientStops(from el in Enumerable.Range(0, 21) let ind = (int)Math.Round(12.75 * el) select new GradientStop(Colour.FromRgb(MakoRGB[ind, 0], MakoRGB[ind, 1], MakoRGB[ind, 2]), el * 0.05))
 Mako gradient, based on the homonymous colour scale included in the "viridis" R package (). More...
 
static readonly GradientStops Turbo = new GradientStops(from el in Enumerable.Range(0, 21) let ind = (int)Math.Round(12.75 * el) select new GradientStop(Colour.FromRgb(TurboRGB[ind, 0], TurboRGB[ind, 1], TurboRGB[ind, 2]), el * 0.05))
 Turbo gradient, based on the homonymous colour scale included in the "viridis" R package (). More...
 

Detailed Description

Standard gradients.

Definition at line 13 of file Gradients.cs.

Member Function Documentation

◆ CividisColouring()

static Colour VectSharp.Gradients.CividisColouring ( double  x)
static

Cividis colour map, based on the homonymous colour scale included in the "viridis" R package ().

Parameters
xThe position in the map (ranging from 0 to 1).
Returns
The colour at the corresponding position in the colour map.

Definition at line 162 of file Gradients.cs.

◆ InfernoColouring()

static Colour VectSharp.Gradients.InfernoColouring ( double  x)
static

Inferno colour map, based on the homonymous colour scale included in the "viridis" R package ().

Parameters
xThe position in the map (ranging from 0 to 1).
Returns
The colour at the corresponding position in the colour map.

Definition at line 126 of file Gradients.cs.

◆ MagmaColouring()

static Colour VectSharp.Gradients.MagmaColouring ( double  x)
static

Magma colour map, based on the homonymous colour scale included in the "viridis" R package ().

Parameters
xThe position in the map (ranging from 0 to 1).
Returns
The colour at the corresponding position in the colour map.

Definition at line 114 of file Gradients.cs.

◆ MakoColouring()

static Colour VectSharp.Gradients.MakoColouring ( double  x)
static

Mako colour map, based on the homonymous colour scale included in the "viridis" R package ().

Parameters
xThe position in the map (ranging from 0 to 1).
Returns
The colour at the corresponding position in the colour map.

Definition at line 186 of file Gradients.cs.

◆ PlasmaColouring()

static Colour VectSharp.Gradients.PlasmaColouring ( double  x)
static

Plasma colour map, based on the homonymous colour scale included in the "viridis" R package ().

Parameters
xThe position in the map (ranging from 0 to 1).
Returns
The colour at the corresponding position in the colour map.

Definition at line 138 of file Gradients.cs.

◆ RocketColouring()

static Colour VectSharp.Gradients.RocketColouring ( double  x)
static

Rocket colour map, based on the homonymous colour scale included in the "viridis" R package ().

Parameters
xThe position in the map (ranging from 0 to 1).
Returns
The colour at the corresponding position in the colour map.

Definition at line 174 of file Gradients.cs.

◆ TurboColouring()

static Colour VectSharp.Gradients.TurboColouring ( double  x)
static

Turbo colour map, based on the homonymous colour scale included in the "viridis" R package ().

Parameters
xThe position in the map (ranging from 0 to 1).
Returns
The colour at the corresponding position in the colour map.

Definition at line 198 of file Gradients.cs.

◆ ViridisColouring()

static Colour VectSharp.Gradients.ViridisColouring ( double  x)
static

Viridis colour map, based on the homonymous colour scale included in the "viridis" R package ().

Parameters
xThe position in the map (ranging from 0 to 1).
Returns
The colour at the corresponding position in the colour map.

Definition at line 150 of file Gradients.cs.

Member Data Documentation

◆ Cividis

readonly GradientStops VectSharp.Gradients.Cividis = new GradientStops(from el in Enumerable.Range(0, 21) let ind = (int)Math.Round(12.75 * el) select new GradientStop(Colour.FromRgb(CividisRGB[ind, 0], CividisRGB[ind, 1], CividisRGB[ind, 2]), el * 0.05))
static

Cividis gradient, based on the homonymous colour scale included in the "viridis" R package ().

Definition at line 92 of file Gradients.cs.

◆ Inferno

readonly GradientStops VectSharp.Gradients.Inferno = new GradientStops(from el in Enumerable.Range(0, 21) let ind = (int)Math.Round(12.75 * el) select new GradientStop(Colour.FromRgb(InfernoRGB[ind, 0], InfernoRGB[ind, 1], InfernoRGB[ind, 2]), el * 0.05))
static

Inferno gradient, based on the homonymous colour scale included in the "viridis" R package ().

Definition at line 77 of file Gradients.cs.

◆ Magma

readonly GradientStops VectSharp.Gradients.Magma = new GradientStops(from el in Enumerable.Range(0, 21) let ind = (int)Math.Round(12.75 * el) select new GradientStop(Colour.FromRgb(MagmaRGB[ind, 0], MagmaRGB[ind, 1], MagmaRGB[ind, 2]), el * 0.05))
static

Magma gradient, based on the homonymous colour scale included in the "viridis" R package ().

Definition at line 72 of file Gradients.cs.

◆ Mako

readonly GradientStops VectSharp.Gradients.Mako = new GradientStops(from el in Enumerable.Range(0, 21) let ind = (int)Math.Round(12.75 * el) select new GradientStop(Colour.FromRgb(MakoRGB[ind, 0], MakoRGB[ind, 1], MakoRGB[ind, 2]), el * 0.05))
static

Mako gradient, based on the homonymous colour scale included in the "viridis" R package ().

Definition at line 102 of file Gradients.cs.

◆ MutedRainbow

readonly GradientStops VectSharp.Gradients.MutedRainbow = new GradientStops(new GradientStop(Colour.FromRgb(221, 204, 119), 0), new GradientStop(Colour.FromRgb(153, 153, 51), 0.125), new GradientStop(Colour.FromRgb(17, 119, 51), 0.25), new GradientStop(Colour.FromRgb(68, 170, 153), 0.375), new GradientStop(Colour.FromRgb(136, 204, 238), 0.5), new GradientStop(Colour.FromRgb(51, 34, 136), 0.625), new GradientStop(Colour.FromRgb(170, 68, 153), 0.75), new GradientStop(Colour.FromRgb(136, 34, 85), 0.875), new GradientStop(Colour.FromRgb(204, 102, 119), 1))
static

Rainbow gradient with Paul Tol's Muted palette ().

Definition at line 53 of file Gradients.cs.

◆ MutedRainbowDiscrete

readonly GradientStops VectSharp.Gradients.MutedRainbowDiscrete = new GradientStops(new GradientStop(Colour.FromRgb(187, 187, 187), 0.101), new GradientStop(Colour.FromRgb(187, 187, 187), 0.1), new GradientStop(Colour.FromRgb(221, 204, 119), 0.101), new GradientStop(Colour.FromRgb(221, 204, 119), 0.2), new GradientStop(Colour.FromRgb(153, 153, 51), 0.201), new GradientStop(Colour.FromRgb(153, 153, 51), 0.3), new GradientStop(Colour.FromRgb(17, 119, 51), 0.301), new GradientStop(Colour.FromRgb(17, 119, 51), 0.4), new GradientStop(Colour.FromRgb(68, 170, 153), 0.401), new GradientStop(Colour.FromRgb(68, 170, 153), 0.5), new GradientStop(Colour.FromRgb(136, 204, 238), 0.501), new GradientStop(Colour.FromRgb(136, 204, 238), 0.6), new GradientStop(Colour.FromRgb(51, 34, 136), 0.601), new GradientStop(Colour.FromRgb(51, 34, 136), 0.7), new GradientStop(Colour.FromRgb(170, 68, 153), 0.701), new GradientStop(Colour.FromRgb(170, 68, 153), 0.8), new GradientStop(Colour.FromRgb(136, 34, 85), 0.801), new GradientStop(Colour.FromRgb(136, 34, 85), 0.9), new GradientStop(Colour.FromRgb(204, 102, 119), 0.901), new GradientStop(Colour.FromRgb(204, 102, 119), 1))
static

Rainbow gradient with Paul Tol's Muted palette () in discrete steps.

Definition at line 58 of file Gradients.cs.

◆ OkabeItoRainbow

readonly GradientStops VectSharp.Gradients.OkabeItoRainbow = new GradientStops(new GradientStop(Colour.FromRgb(204, 121, 167), 0), new GradientStop(Colour.FromRgb(213, 94, 0), 1.0 / 6), new GradientStop(Colour.FromRgb(230, 159, 0), 1.0 / 3), new GradientStop(Colour.FromRgb(240, 228, 66), 0.5), new GradientStop(Colour.FromRgb(0, 158, 115), 2.0 / 3), new GradientStop(Colour.FromRgb(0, 114, 178), 5.0 / 6), new GradientStop(Colour.FromRgb(86, 180, 233), 1))
static

Rainbow gradient with Okabe-Ito colour-blind safe colours ().

Definition at line 43 of file Gradients.cs.

◆ OkabeItoRainbowDiscrete

readonly GradientStops VectSharp.Gradients.OkabeItoRainbowDiscrete = new GradientStops(new GradientStop(Colour.FromRgb(204, 121, 167), 0), new GradientStop(Colour.FromRgb(204, 121, 167), 0.2), new GradientStop(Colour.FromRgb(230, 159, 0), 0.201), new GradientStop(Colour.FromRgb(230, 159, 0), 0.4), new GradientStop(Colour.FromRgb(0, 158, 115), 0.401), new GradientStop(Colour.FromRgb(0, 158, 115), 0.6), new GradientStop(Colour.FromRgb(0, 114, 178), 0.601), new GradientStop(Colour.FromRgb(0, 114, 178), 0.8), new GradientStop(Colour.FromRgb(86, 180, 233), 0.801), new GradientStop(Colour.FromRgb(86, 180, 233), 1))
static

Rainbow gradient with Okabe-Ito colour-blind safe colours () in discrete steps.

Definition at line 48 of file Gradients.cs.

◆ Plasma

readonly GradientStops VectSharp.Gradients.Plasma = new GradientStops(from el in Enumerable.Range(0, 21) let ind = (int)Math.Round(12.75 * el) select new GradientStop(Colour.FromRgb(PlasmaRGB[ind, 0], PlasmaRGB[ind, 1], PlasmaRGB[ind, 2]), el * 0.05))
static

Plasma gradient, based on the homonymous colour scale included in the "viridis" R package ().

Definition at line 82 of file Gradients.cs.

◆ Rainbow

readonly GradientStops VectSharp.Gradients.Rainbow = new GradientStops(new GradientStop(Colour.FromRgb(237, 28, 36), 0), new GradientStop(Colour.FromRgb(255, 127, 39), 1.0 / 6), new GradientStop(Colour.FromRgb(255, 242, 0), 1.0 / 3), new GradientStop(Colour.FromRgb(34, 177, 76), 0.5), new GradientStop(Colour.FromRgb(0, 162, 232), 2.0 / 3), new GradientStop(Colour.FromRgb(63, 72, 204), 5.0 / 6), new GradientStop(Colour.FromRgb(163, 73, 164), 1))
static

Rainbow gradient (red, orange, yellow, green, blue, indigo, violet).

Definition at line 33 of file Gradients.cs.

◆ RedToGreen

readonly GradientStops VectSharp.Gradients.RedToGreen = new GradientStops(new GradientStop(Colour.FromRgb(237, 28, 36), 0), new GradientStop(Colour.FromRgb(34, 177, 76), 1))
static

Gradient from red (0) to green (1).

Definition at line 28 of file Gradients.cs.

◆ RedYellowGreen

readonly GradientStops VectSharp.Gradients.RedYellowGreen = new GradientStops(new GradientStop(Colour.FromRgb(237, 28, 36), 0), new GradientStop(Colour.FromRgb(255, 242, 0), 0.5), new GradientStop(Colour.FromRgb(34, 177, 76), 1))
static

Gradient from red (0) to yellow (0.5) to green (1).

Definition at line 38 of file Gradients.cs.

◆ Rocket

readonly GradientStops VectSharp.Gradients.Rocket = new GradientStops(from el in Enumerable.Range(0, 21) let ind = (int)Math.Round(12.75 * el) select new GradientStop(Colour.FromRgb(RocketRGB[ind, 0], RocketRGB[ind, 1], RocketRGB[ind, 2]), el * 0.05))
static

Rocket gradient, based on the homonymous colour scale included in the "viridis" R package ().

Definition at line 97 of file Gradients.cs.

◆ TransparentToBlack

readonly GradientStops VectSharp.Gradients.TransparentToBlack = new GradientStops(new GradientStop(Colour.FromRgba(0, 0, 0, 0), 0), new GradientStop(Colour.FromRgb(0, 0, 0), 1))
static

Gradient from transparent black (0) to opaque black (1).

Definition at line 18 of file Gradients.cs.

◆ Turbo

readonly GradientStops VectSharp.Gradients.Turbo = new GradientStops(from el in Enumerable.Range(0, 21) let ind = (int)Math.Round(12.75 * el) select new GradientStop(Colour.FromRgb(TurboRGB[ind, 0], TurboRGB[ind, 1], TurboRGB[ind, 2]), el * 0.05))
static

Turbo gradient, based on the homonymous colour scale included in the "viridis" R package ().

Definition at line 107 of file Gradients.cs.

◆ Viridis

readonly GradientStops VectSharp.Gradients.Viridis = new GradientStops(from el in Enumerable.Range(0, 21) let ind = (int)Math.Round(12.75 * el) select new GradientStop(Colour.FromRgb(ViridisRGB[ind, 0], ViridisRGB[ind, 1], ViridisRGB[ind, 2]), el * 0.05))
static

Viridis gradient, based on the homonymous colour scale included in the "viridis" R package ().

Definition at line 87 of file Gradients.cs.

◆ WhiteToBlack

readonly GradientStops VectSharp.Gradients.WhiteToBlack = new GradientStops(new GradientStop(Colour.FromRgb(255, 255, 255), 0), new GradientStop(Colour.FromRgb(0, 0, 0), 1))
static

Gradient from white (0) to black (1).

Definition at line 23 of file Gradients.cs.


The documentation for this class was generated from the following file: