StandardGradients

public static class StandardGradients
Provides a collection of default gradients, as well as access to custom user gradients.

Properties

ActiValue

#
[Nomen("ActiValue|G", "Palette of five colours designed by Bas Vredeling.", "Standard", "Diagram", 3)] public static Gradient ActiValue { get; }
Five colour palette designed by Bas Vredeling.

Autumn

#
[Nomen("Autumn|B", "A collection of autumn colours.", "Standard", "Natural", 2)] public static Gradient Autumn { get; }
Gets a preset gradient containing a collection of autumn colours.

Balance

#
[Nomen("Balance|F", "Normalised balance gradient designed by Kristen Thyng.", "Standard", "Scientific", 1)] public static Gradient Balance { get; }
Normalised balance gradient designed by Kristen Thyng.

Bathymetry

#
[Nomen("Bathymetry|A", "Bathometry scale parameterised at metres depth.", "Standard", "Topography", 1)] public static Gradient Bathymetry { get; }
Bathometry scale parameterised at metres depth.

BipolarLlama

#
[Nomen("Bipolar Llama|B", "Purple and veridian on opposites sides of grey.", "Standard", "Somber", 3)] public static Gradient BipolarLlama { get; }
Purple and veridian on opposites sides of grey.

Blackbody

#
[Nomen("Blackbody|D", "Visible component of black-body radiation, parameterised at the Kelvin scale.", "Standard", "Analytic", 2)] public static Gradient Blackbody { get; }
The entire visible spectrum, parameterised at nanometre wavelengths.

Blue

#
[Nomen("Blue|C", "Black to white via blue.", "Standard", "Monotone", 1)] public static Gradient Blue { get; }
Gets a preset gradient from black to white via blue.

BlueSienna

#
[Nomen("BlueSienna|A", "Blue to sienna with a discontinuity in the middle from cyan to yellow.", "Standard", "Analytic", 2)] public static Gradient BlueSienna { get; }
Gets a preset gradient from blue to red with a discontinuity in the middle from cyan to yellow.

Candy

#
[Nomen("Candy|A", "Percentage based progression from pale yellow to dark purple with a bias towards the end of the scale.", "Standard", "Diagram", 2)] public static Gradient Candy { get; }
Percentage based progression from pale yellow to deep purple with a bias towards the end of the scale.

ChocolateMoose

#
[Nomen("Chocolate Moose|C", "Palette of five colours designed by Bas Vredeling.", "Standard", "Diagram", 3)] public static Gradient ChocolateMoose { get; }
Five colour palette designed by Bas Vredeling.

ColourVision

#
[Nomen("Colour Vision|A", "A set of colours visible to people with regular colour vision.", "Standard", "Scientific", 3)] public static Gradient ColourVision { get; }
A set of colours visible to people with regular colour vision.

Conceptuality

#
[Nomen("Conceptuality|H", "Palette of five colours designed by Bas Vredeling.", "Standard", "Diagram", 3)] public static Gradient Conceptuality { get; }
Five colour palette designed by Bas Vredeling.

Curl

#
[Nomen("Curl|E", "Normalised curl gradient designed by Kristen Thyng.", "Standard", "Scientific", 1)] public static Gradient Curl { get; }
Normalised curl gradient designed by Kristen Thyng.

CustomNames

#
public static IEnumerable<string> CustomNames { get; }
Enumerates over all custom gradient names.

DarkAndNeutral

#
[Nomen("Dark and Neutral|A", "A progression from dark green to medium grey.", "Standard", "Somber", 1)] public static Gradient DarkAndNeutral { get; }
A progression from dark green to medium grey.

DarkButWarm

#
[Nomen("Dark but Warm|B", "A progression from dark red to Spanish orange.", "Standard", "Somber", 1)] public static Gradient DarkButWarm { get; }
A progression from dark red to Spanish orange.

DarkYetCold

#
[Nomen("Dark yet Cold|C", "A progression from Delft blue to Cadet blue.", "Standard", "Somber", 1)] public static Gradient DarkYetCold { get; }
A progression from Delft blue to Cadet blue.

Deep

#
[Nomen("Deep|F", "Normalised depth gradient designed by Kristen Thyng.", "Standard", "Scientific", 2)] public static Gradient Deep { get; }
Normalised depth gradient designed by Kristen Thyng.

Delta

#
[Nomen("Delta|G", "Normalised delta gradient designed by Kristen Thyng.", "Standard", "Scientific", 1)] public static Gradient Delta { get; }
Normalised delta gradient designed by Kristen Thyng.

DemPoster

#
[Nomen("DEM Poster|D", "DEM colour scale for positive elevations in metres.", "Standard", "Topography", 1)] public static Gradient DemPoster { get; }
DEM colour scale for positive elevations in metres.

Dense

#
[Nomen("Dense|G", "Normalised density gradient designed by Kristen Thyng.", "Standard", "Scientific", 2)] public static Gradient Dense { get; }
Normalised density gradient designed by Kristen Thyng.

Deuteranomialia

#
[Nomen("Deuteranomialia|B", "Modification of 'Colour Vision' gradient adjusted for deuteranomalia colour blindness.", "Standard", "Scientific", 3)] public static Gradient Deuteranomialia { get; }
Modification of 'Colour Vision' gradient adjusted for deuteranomalia colour blindness.

Divergent

#
[Nomen("Divergent|D", "Continuous diverent scheme by J. Green.", "Standard", "Analytic", 1)] public static Gradient Divergent { get; }
Continuous diverent scheme by J. Green.

Earth

#
[Nomen("Earth|A", "A collection of Terran colours.", "Standard", "Natural", 3)] public static Gradient Earth { get; }
Gets a preset gradient containing a collection of Terran colours.

Fire

#
[Nomen("Fire|C", "Flame like colours.", "Standard", "Analytic", 1)] public static Gradient Fire { get; }
Flame like colours.

Forest

#
[Nomen("Forest|B", "A collection of forest greens.", "Standard", "Natural", 1)] public static Gradient Forest { get; }
Gets a preset gradient containing forest like colours.

GaneshasBlessing

#
[Nomen("Ganesha's Blessing|B", "Palette of five colours designed by Bas Vredeling.", "Standard", "Diagram", 3)] public static Gradient GaneshasBlessing { get; }
Five colour palette designed by Bas Vredeling.

Garish

#
[Nomen("Garish|E", "Garish scheme by J. Green.", "Standard", "Analytic", 1)] public static Gradient Garish { get; }
Garish scheme by J. Green.

GeologicalEpochs

#
[Nomen("Geological Epochs|C", "The geological epochs according to the GTS 2012 standard, parameterised at MYA.", "Standard", "Scientific", 4)] public static Gradient GeologicalEpochs { get; }
The geological epochs according to the GTS 2012 standard, parameterised at MYA.

GeologicalEras

#
[Nomen("Geological Eras|A", "The geological eras according to the GTS 2012 standard, parameterised at MYA.", "Standard", "Scientific", 4)] public static Gradient GeologicalEras { get; }
The geological eras according to the GTS 2012 standard, parameterised at MYA.

GeologicalPeriods

#
[Nomen("Geological Periods|B", "The geological periods according to the GTS 2012 standard, parameterised at MYA.", "Standard", "Scientific", 4)] public static Gradient GeologicalPeriods { get; }
The geological periods according to the GTS 2012 standard, parameterised at MYA.

GlobalRelief

#
[Nomen("Global Relief|C", "NGDC elevation gradient for relief maps, parameterised to metres.", "Standard", "Topography", 1)] public static Gradient GlobalRelief { get; }
NGDC elevation gradient for relief maps, parameterised to metres.

GloomyDisco

#
[Nomen("Gloomy Disco|A", "A progression from royal purple to celestial blue.", "Standard", "Somber", 2)] public static Gradient GloomyDisco { get; }
A progression from royal purple to celestial blue.

Gold

#
[Nomen("Gold|D", "Black to white via gold.", "Standard", "Monotone", 2)] public static Gradient Gold { get; }
Gets a preset gradient from black to white via gold.

GoodNewsBadNews

#
[Nomen("Good News Bad News|F", "Palette of five colours designed by Bas Vredeling.", "Standard", "Diagram", 3)] public static Gradient GoodNewsBadNews { get; }
Five colour palette designed by Bas Vredeling.

Green

#
[Nomen("Green|B", "Black to white via green.", "Standard", "Monotone", 1)] public static Gradient Green { get; }
Gets a preset gradient from black to white via green.

Grey

#
[Nomen("Grey|D", "Black to white.", "Standard", "Monotone", 1)] public static Gradient Grey { get; }
Gets a preset gradient from white to black.

Haline

#
[Nomen("Haline|B", "Normalised haline gradient designed by Kristen Thyng.", "Standard", "Scientific", 1)] public static Gradient Haline { get; }
Normalised haline gradient designed by Kristen Thyng.

HappyHappy

#
[Nomen("Happy Happy|A", "Pleasing spectral progression from red to cream to green to blue.", "Standard", "Diagram", 2)] public static Gradient HappyHappy { get; }
Pleasing spectral progression from red to cream to green to blue.

Heat

#
[Nomen("Heat|B", "Temperature associated colours from cool blue to hot red.", "Standard", "Analytic", 1)] public static Gradient Heat { get; }
Gets a preset gradient containing temperature associated colours.

HeatDeath

#
[Nomen("Heat Death|C", "A dark spectral cycle.", "Standard", "Somber", 2)] public static Gradient HeatDeath { get; }
A dark spectral cycle.

HortusBotanicus

#
[Nomen("Hortus Botanicus|A", "Palette of five colours designed by Bas Vredeling.", "Standard", "Diagram", 3)] public static Gradient HortusBotanicus { get; }
Five colour palette designed by Bas Vredeling.

Hue

#
[Nomen("Hue|B", "The hue wheel, starting and ending at red.", "Standard", "Analytic", 2)] public static Gradient Hue { get; }
Gets a preset gradient across the hue spectrum.

Ice

#
[Nomen("Ice|B", "Normalised ice gradient designed by Kristen Thyng.", "Standard", "Scientific", 2)] public static Gradient Ice { get; }
Normalised ice gradient designed by Kristen Thyng.

IcecreamFromItaly

#
[Nomen("Icecream from Italy|D", "Palette of five colours designed by Bas Vredeling.", "Standard", "Diagram", 3)] public static Gradient IcecreamFromItaly { get; }
Five colour palette designed by Bas Vredeling.

Icelandic

#
[Nomen("Icelandic|E", "Icelandic topographic palette for positive elevations in metres.", "Standard", "Topography", 1)] public static Gradient Icelandic { get; }
Icelandic topographic palette for positive elevations in metres.

Jupiter

#
[Nomen("Jupiter|C", "A collection of Jovian colours.", "Standard", "Natural", 3)] public static Gradient Jupiter { get; }
Gets a preset gradient containing a collection of Jovian colours.

Logarithmic

#
[Nomen("Logarithmic|F", "Base-10 logarithmic scale from 1e-5 to 1e+5 based on the Open Color Standard.", "Standard", "Diagram", 1)] public static Gradient Logarithmic { get; }
Base-10 logarithmic scale from 1e-5 to 1e+5 based on the Open Color Standard.

Matter

#
[Nomen("Matter|E", "Normalised matter gradient designed by Kristen Thyng.", "Standard", "Scientific", 2)] public static Gradient Matter { get; }
Normalised matter gradient designed by Kristen Thyng.

MellowGold

#
[Nomen("Mellow Gold|J", "Palette of five colours designed by Bas Vredeling.", "Standard", "Diagram", 3)] public static Gradient MellowGold { get; }
Five colour palette designed by Bas Vredeling.

Mixed12

#
[Nomen("Mixed 12|D", "Twelve discontinuous mixed colours by 'Interactive Things'.", "Standard", "Diagram", 1)] public static Gradient Mixed12 { get; }
Twelve discontinuous mixed colours by 'Interactive Things'.

Mulberry

#
[Nomen("Mulberry|B", "A progression from carmine to egyptian blue.", "Standard", "Somber", 2)] public static Gradient Mulberry { get; }
A progression from carmine to egyptian blue.

Neptune

#
[Nomen("Neptune|D", "A collection of Neptunian colours.", "Standard", "Natural", 3)] public static Gradient Neptune { get; }
Gets a preset gradient containing a collection of Neptunian colours.

NerdFlirt

#
[Nomen("Nerd Flirt|E", "Palette of five colours designed by Bas Vredeling.", "Standard", "Diagram", 3)] public static Gradient NerdFlirt { get; }
Five colour palette designed by Bas Vredeling.

Nordisk

#
[Nomen("Nordisk|B", "Norwegian scale parameterised to metres.", "Standard", "Topography", 1)] public static Gradient Nordisk { get; }
Norwegian false colour elevation gradient parameterised to metres.

Orange

#
[Nomen("Orange|C", "Black to white via orange.", "Standard", "Monotone", 2)] public static Gradient Orange { get; }
Gets a preset gradient from black to white via orange.

Oxy

#
[Nomen("Oxy|D", "Normalised oxy gradient designed by Kristen Thyng.", "Standard", "Scientific", 1)] public static Gradient Oxy { get; }
Normalised oxy gradient designed by Kristen Thyng.

Paired10

#
[Nomen("Paired 10|B", "Ten discontinuous paired colours by Cynthia Brewer.", "Standard", "Diagram", 1)] public static Gradient Paired10 { get; }
Ten discontinuous paired colours by Cynthia Brewer.

Pakistani

#
[Nomen("Pakistani|F", "Pakistani topographic palette for positive elevations in metres.", "Standard", "Topography", 1)] public static Gradient Pakistani { get; }
Pakistani topographic palette for positive elevations in metres.

Phase

#
[Nomen("Phase|C", "Normalised phase gradient designed by Kristen Thyng.", "Standard", "Scientific", 1)] public static Gradient Phase { get; }
Normalised phase gradient designed by Kristen Thyng.

Pink

#
[Nomen("Pink|B", "Black to white via pink.", "Standard", "Monotone", 2)] public static Gradient Pink { get; }
Gets a preset gradient from black to white via pink.

Protanopia

#
[Nomen("Protanopia|C", "Modification of 'Colour Vision' gradient adjusted for protanopia colour blindness.", "Standard", "Scientific", 3)] public static Gradient Protanopia { get; }
Modification of 'Colour Vision' gradient adjusted for protanopia colour blindness.

Purple

#
[Nomen("Purple|A", "Black to white via purple.", "Standard", "Monotone", 2)] public static Gradient Purple { get; }
Gets a preset gradient from black to white via purple.

Rainbow18

#
[Nomen("Rainbow 18|E", "Eighteen discontinuous colour bands from 'KST visualizer'.", "Standard", "Diagram", 1)] public static Gradient Rainbow18 { get; }
Eighteen discontinuous colour bands from 'KST visualizer'.

Red

#
[Nomen("Red|A", "Black to white via red.", "Standard", "Monotone", 1)] public static Gradient Red { get; }
Gets a preset gradient from black to white via red.

Remembrance

#
[Nomen("Remembrance|I", "Palette of five colours designed by Bas Vredeling.", "Standard", "Diagram", 3)] public static Gradient Remembrance { get; }
Five colour palette designed by Bas Vredeling.

RoyalBlue

#
[Nomen("RoyalBlue|E", "Black to white via royal blue.", "Standard", "Monotone", 2)] public static Gradient RoyalBlue { get; }
Gets a preset gradient from black to white via royal blue.

SadAlpaca

#
[Nomen("Sad Alpaca|A", "A dark progression from greyish brown, through depressing orange, to bland olive.", "Standard", "Somber", 3)] public static Gradient SadAlpaca { get; }
A dark progression from greyish brown, through depressing orange, to bland olive.

Soil

#
[Nomen("Soil|A", "A collection of earthly browns.", "Standard", "Natural", 1)] public static Gradient Soil { get; }
Gets a preset gradient containing earthly browns.

Solar

#
[Nomen("Solar|A", "Normalised solar gradient designed by Kristen Thyng.", "Standard", "Scientific", 2)] public static Gradient Solar { get; }
Normalised solar gradient designed by Kristen Thyng.

SousVideSteak

#
[Nomen("Sous-vide Steak|B", "Steak done-ness parameterised at degrees Celsius.", "Standard", "Diagram", 2)] public static Gradient SousVideSteak { get; }
Steak done-ness parameterised at degrees Celsius.

Spectral6

#
[Nomen("Spectral 6|B", "Six discontinuous spectral colours by 'Interactive Things'.", "Standard", "Diagram", 1)] public static Gradient Spectral6 { get; }
Six discontinuous spectral colours by 'Interactive Things'.

Spectrum

#
[Nomen("Spectrum|C", "The entire visible spectrum, parameterised at nanometre wavelengths.", "Standard", "Analytic", 2)] public static Gradient Spectrum { get; }
The entire visible spectrum, parameterised at nanometre wavelengths.

Speed

#
[Nomen("Speed|C", "Normalised speed gradient designed by Kristen Thyng.", "Standard", "Scientific", 2)] public static Gradient Speed { get; }
Normalised speed gradient designed by Kristen Thyng.

Spring

#
[Nomen("Spring|D", "A collection of spring colours.", "Standard", "Natural", 2)] public static Gradient Spring { get; }
Gets a preset gradient containing a collection of spring colours.

StandardNames

#
public static IEnumerable<Nomen> StandardNames { get; }
Enumerate over all hard-coded preset names.

Summer

#
[Nomen("Summer|A", "A collection of summer colours.", "Standard", "Natural", 2)] public static Gradient Summer { get; }
Gets a preset gradient containing a collection of summer colours.

Sunrise

#
[Nomen("Sunrise|D", "A collection of sunrise and water colours.", "Standard", "Natural", 1)] public static Gradient Sunrise { get; }
A collection of sunrise and water colours.

Teal

#
[Nomen("Teal|F", "Black to white via teal.", "Standard", "Monotone", 2)] public static Gradient Teal { get; }
Gets a preset gradient from black to white via a teal/cyan blend.

Tempo

#
[Nomen("Tempo|D", "Normalised tempo gradient designed by Kristen Thyng.", "Standard", "Scientific", 2)] public static Gradient Tempo { get; }
Normalised tempo gradient designed by Kristen Thyng.

Thermal

#
[Nomen("Thermal|A", "Normalised thermal gradient designed by Kristen Thyng.", "Standard", "Scientific", 1)] public static Gradient Thermal { get; }
Normalised thermal gradient designed by Kristen Thyng.

Traffic

#
[Nomen("Traffic|A", "Green to red, via yellow.", "Standard", "Analytic", 1)] public static Gradient Traffic { get; }
Gets a preset gradient from green, via yellow to red.

Tritanopia

#
[Nomen("Tritanopia|D", "Modification of 'Colour Vision' gradient adjusted for tritanopia colour blindness.", "Standard", "Scientific", 3)] public static Gradient Tritanopia { get; }
Modification of 'Colour Vision' gradient adjusted for tritanopia colour blindness.

Turbo

#
[Nomen("Turbo|F", "A smooth progression from dark blue to green to red based on a design by A. Mikhailov.", "Standard", "Analytic", 1)] public static Gradient Turbo { get; }
A smooth progression from dark blue to green to red by Anton Mikhailov.

Venus

#
[Nomen("Venus|B", "A collection of Venerian colours.", "Standard", "Natural", 3)] public static Gradient Venus { get; }
Gets a preset gradient containing a collection of Venerian colours.

Water

#
[Nomen("Water|C", "A collection of watery blues.", "Standard", "Natural", 1)] public static Gradient Water { get; }
Gets a preset gradient containing colours associated with water.

Winter

#
[Nomen("Winter|C", "A collection of winter colours.", "Standard", "Natural", 2)] public static Gradient Winter { get; }
Gets a preset gradient containing a collection of winter colours.

YellowGreen

#
[Nomen("YellowGreen|E", "Black to white via yellowish green.", "Standard", "Monotone", 2)] public static Gradient YellowGreen { get; }
Gets a preset gradient from black to white via yellow green.

Zebra

#
[Nomen("Zebra|A", "Ten sharp transitions from white to black.", "Standard", "Diagram", 1)] public static Gradient Zebra { get; }
Ten alternating black and white bands.

Methods

AddCustomGradient

#
public static void AddCustomGradient(string name, Gradient gradient)
Adds a new custom gradient.
name (string)Name of custom gradient. If the name is already defined, an exception will be thrown.
gradient (Gradient)Gradient to add.
True if gradient was stored.

DeleteCustomGradient

#
public static bool DeleteCustomGradient(string name)
Delete a custom gradient.
name (string)Name of custom gradient.
True if a gradient by that name was deleted.

GetCustomGradient

#
public static Gradient GetCustomGradient(string name)
Gets a custom gradient by name.
name (string)Name of custom gradient.
Custom gradient associated with the given name, or null.

GetStandardGradient

#
public static Gradient GetStandardGradient(Nomen nomen)
Find the standard gradient with the given name.
nomen (Nomen)

GetStandardGradient

#
public static Gradient GetStandardGradient(string name)
Find the standard gradient with the given name.
name (string)

IsPresetExact

#
public static bool IsPresetExact(Gradient gradient, out string name)
Test to see if a gradient matches one of the presets.
gradient (Gradient)Gradient to check.
name (out string)Name of preset.
True if the gradient was identical to a named preset.

IsPresetFuzzy

#
public static bool IsPresetFuzzy(Gradient gradient, out string name, out double lower, out double upper)
Test to see if a gradient matches one of the presets, allowing for remapped domains.
gradient (Gradient)Gradient to check.
name (out string)Name of preset.
lower (out double)Remapped lower end of domain, or NaN if not remapped.
upper (out double)Remapped upper end of domain, or NaN if not remapped.
True if the gradient was identical to a named preset.

PopulateContextMenu

#
public static void PopulateContextMenu(ContextMenu menu, EventHandler<EventArgs> menuClickHandler)
Populates a menu with gradient presets. The Command.Parameter of each inserted menu item contains the Description for the relevant gradient.
menu (ContextMenu)Menu to populate.
menuClickHandler (EventHandler<EventArgs>)Handler for gradient menu items.

TryParseStandardGradient

#
public static bool TryParseStandardGradient(string text, out Gradient gradient)
Try and create one of the standard or custom gradients from a description. A suffix in the form " from a to b" will be taken to mean a domain remapping. 'A' and 'b' may be numbers, dates or times.
text (string)Text to parse.
gradient (out Gradient)Gradient if successful.
True on success, false on failure.