public abstract class Kel : IStateDependent
Variable colour used in icon state animations. This class is called Kel after the reconstructed Proto-Indo-European root for "colour", to differentiate it from more useful and widely used colour-like types. See: https://en.wiktionary.org/wiki/Reconstruction:Proto-Indo-European/%E1%B8%B1el-

Constructors

Kel

#
protected Kel(Color colour)
Create a new colour.
colour (Color)Initial colour.

Kel

#
protected Kel(IReader reader)
reader (IReader)

Properties

Value

#
public Color Value { get; protected set; }
Gets the current colour.

Methods

Make

#
public static Kel Make(Color colour)
Create a new, constant colour.
colour (Color)Constant colour.
Colour.

Make

#
public static Kel Make(Kel a, Kel b, Nem mix)
Create a new, mixed colour.
a (Kel)Primary colour.
b (Kel)Secondary colour.
mix (Nem)Mixing factor.
Colour.

Make

#
public static Kel Make(Nem red, Nem green, Nem blue, Nem alpha)
Create a new variable colour.
red (Nem)Red variable.
green (Nem)Green variable.
blue (Nem)Blue variable.
alpha (Nem)Alpha variable.
Colour.

Make

#
public static Kel Make(Nem red, Nem green, Nem blue)
Create a new variable colour.
red (Nem)Red variable.
green (Nem)Green variable.
blue (Nem)Blue variable.
Colour.

Make

#
public static Kel Make(SpecialColour code)
Create a special colour, which ultimately depends on context.
code (SpecialColour)

Make

#
public static Kel Make(string stateName, Color colour)
Create a new colour with a fading transparency.
stateName (string)Name of normalised state.
colour (Color)Base colour.
Colour.

Make

#
public static Kel Make(string stateName, Color colour0, Color colour1)
Create a new dual colour.
stateName (string)Name of normalised state which interpolates between both colours.
colour0 (Color)Colour associated with state=0.0
colour1 (Color)Colour associated with state=1.0
Colour.

Resolve

#
public virtual Color Resolve(IconContext context)
Resolve the colour for the given context.
context (IconContext)Context.
Colour appropriate for context.

Store

#
public virtual void Store(IWriter writer)
writer (IWriter)
Store

Update

#
public abstract void Update(string name, double value)
name (string)
value (double)
Update

Convertors

OperationResultDescription
implicitColorKelCreate a new constant colour.
implicitSpecialColourKelConvert a special colour to a Kel.