Class ColorResolver
S-100 colour-token resolution shared by the vector rendering backends.
Resolves a token through a ColorPalette, falling back to an
inline hex literal (e.g. the S-421 RouteActionPoint <foreground>
emits a bare AA44A8) and finally to opaque black.
public static class ColorResolver
- Inheritance
-
ColorResolver
- Inherited Members
Properties
Black
Opaque black.
public static RgbaColor Black { get; }
Property Value
Methods
ApplyTransparency(RgbaColor, double?)
Returns color with its alpha attenuated by
transparency (0 = unchanged opaque, 1 = fully
transparent). When transparency is null the colour is
returned unchanged.
public static RgbaColor ApplyTransparency(RgbaColor color, double? transparency)
Parameters
Returns
Create(ColorPalette?)
Builds a colour resolver from the given palette. The returned delegate maps a (possibly null) S-100 colour token to a resolved RgbaColor.
public static Func<string?, RgbaColor> Create(ColorPalette? palette)
Parameters
paletteColorPalette
Returns
ResolveSymbolColor(string?, Func<string?, RgbaColor>)
Heuristic fallback colour for a symbol that has no resolvable SVG, keyed off the S-100 symbol name prefix (mirrors the legacy renderer's dot-fallback palette).
public static RgbaColor ResolveSymbolColor(string? symbolRef, Func<string?, RgbaColor> resolveColor)