public sealed class Shade : IStorable
Immutable collection of shading colours for shapes.

Constructors

Shade

#
public Shade(Color apex, Color edge, Color text)
Palette constructor.
apex (Color)apex fill colour.
edge (Color)Edge colour
text (Color)Text colour.

Shade

#
public Shade(Color apex, Color slab, Color edge, Color text, FillDescription overlay)
Palette constructor.
apex (Color)Apex fill colour.
slab (Color)Slab fill colour.
edge (Color)Edge colour
text (Color)Text colour.
overlay (FillDescription)Optional filter fill.

Shade

#
public Shade(Color apex)
Palette constructor with sensible default values for most settings based on a guiding apex colour.
apex (Color)Apex fill colour.

Shade

#
public Shade(IReader reader)
Deserialization constructor.
reader (IReader)Reader object.

Properties

Apex

#
public Color Apex { get; }
Gets the fill colour of the apex (or front) face of the shape.

Edge

#
public Color Edge { get; }
Gets the colour used for the shape edges. This is usually a much darker shade of the Apex colour.

Overlay

#
public FillDescription Overlay { get; }
Gets the filter fill, if any.

Slab

#
public Color Slab { get; }
Gets the colour of the slab sides of the shape. This is usually a somewhat darker shade of the Apex colour.

Text

#
public Color Text { get; }
Gets the text colour of the shape. This is usually a foreground shade of the Apex colour.

Methods

Combine

#
public Shade Combine(Color filter)
Overlay a colour onto this shade.
filter (Color)Colour to filter.
Modified shade.

Fade

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

Interpolate

#
public Shade Interpolate(Shade other, float factor)
Interpolate between this shade and another.
other (Shade)Other shade.
factor (float)Interpolation factor.
Interpolated shade.

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

WithApex

#
public Shade WithApex(Color apex)
Modify a colour in this palette.
apex (Color)

WithEdge

#
public Shade WithEdge(Color edge)
Modify a colour in this palette.
edge (Color)

WithoutOverlay

#
public Shade WithoutOverlay()
Modify the filter of this palette.

WithOverlay

#
public Shade WithOverlay(FillDescription fill)
Modify the filter of this palette.
fill (FillDescription)

WithSlab

#
public Shade WithSlab(Color slab)
Modify a colour in this palette.
slab (Color)

WithText

#
public Shade WithText(Color text)
Modify a colour in this palette.
text (Color)