Colorization¶
Namespace Nfty.Core.Model in assembly Nfty.Ticket.
How a Dynamic or Static layer is colored.
Constructors¶
Colorization(ColorModel, int, int, IReadOnlyList<ColorEntry>)¶
public Colorization(ColorModel Model, int HueQuantize, int SatQuantize, IReadOnlyList<ColorEntry> Entries);
Parameters
Model(ColorModel) - The color space the entries are expressed in.HueQuantize(int) - Hue bucket width in degrees, used when hashing the DNA. Quantizing is what folds a continuous color space into something countable, so two assets whose hues fall in one bucket are the same asset.SatQuantize(int) - Saturation bucket width in percentage points, likewise.Entries(IReadOnlyList<ColorEntry>) - The weighted color options. A Static layer has exactly one, fixed.
Properties¶
Entries¶
The weighted color options. A Static layer has exactly one, fixed.
HueQuantize¶
Hue bucket width in degrees, used when hashing the DNA. Quantizing is what folds a continuous color space into something countable, so two assets whose hues fall in one bucket are the same asset.
Model¶
The color space the entries are expressed in.
SatQuantize¶
Saturation bucket width in percentage points, likewise.
Methods¶
Starter(LayerKind, ColorModel, ColorRange, string)¶
public static Colorization? Starter(LayerKind kind, ColorModel model, ColorRange range, string fixedSpec);
The colorization a new layer of kind starts with: one ranged entry for Dynamic, one fixed entry for Static, none for Custom (composited as-is).
Parameters
kind(LayerKind) - The layer's kind.model(ColorModel) - The color space.range(ColorRange) - The band a Dynamic layer rolls within.fixedSpec(string) - The prefixed color a Static layer applies.
Returns. The colorization, or null for a Custom layer.