public sealed class Shades : IStorable
A collection of related shades.

Constructors

Shades

#
public Shades(IReader reader)
Deserialisation constructor.
reader (IReader)

Shades

#
public Shades(Shade normal, Shade hidden, Shade disabled, Shade normalSelected, Shade hiddenSelected, Shade disabledSelected, Shade tentative)
Create a new colour shade scheme.
normal (Shade)
hidden (Shade)
disabled (Shade)
normalSelected (Shade)
hiddenSelected (Shade)
disabledSelected (Shade)
tentative (Shade)

Fields

DefaultDim

#
public static readonly Shades DefaultDim
Gets the default shading scheme in dark mode.

DefaultLit

#
public static readonly Shades DefaultLit
Gets the default shading scheme in bright mode.

Indexers

this[]

#
public Shade this[IDocumentObject documentObject, bool selected] { get; }
Figure out the most appropriate shade for a given object.
documentObject (IDocumentObject)Document object to match.
selected (bool)Selected state override.

this[]

#
public Shade this[IDocumentObject documentObject] { get; }
Figure out the most appropriate shade for a given object.
documentObject (IDocumentObject)Document object to match.

this[]

#
public Shade this[ShadeKind kind] { get; }
Gets the colour associated with the given kind.
kind (ShadeKind)

Methods

Fade

#
public Shades Fade(float factor)
Multiply the alpha value colours in this collection with the given factor.
factor (float)Fading factor. 0=fully transparent, 1=no change.
Modified palette.

Interpolate

#
public Shades Interpolate(Shades other, float factor)
Interpolate between schemes.
other (Shades)Other scheme.
factor (float)Interpolation factor.
Interpolated scheme.

Store

#
public void Store(IWriter writer)
This method is called whenever the instance is required to serialize itself.
writer (IWriter)Writer object to serialize with.
Store

With

#
public Shades With(ShadeKind kind, Shade shade)
Modify one of the colours.
kind (ShadeKind)Index of colour spec to modify.
shade (Shade)New colour.
Modified colours.