SkinDefinitionText
The text form of a skin definition. One property per line:
// comment
Lit.Shades.Apex.Normal = #E2E2E2
Lit.Shades.Slab.Normal = Lit.Shades.Apex.Normal | Luminance -20%
Lit.Shape.Corners = 3
Lit.Icons.Filter = Saturation -70% | Mix Lit.Canvas.Paper 10%
Lit.Wires.Dash.Null = 4 1 Colour literals use CSS notation: hex, oklch(), oklab() or rgb(), with an optional alpha after a slash. A filter is a bare stack of colour modifiers, or None. A dash pattern is dash and gap lengths in multiples of the wire width, or Solid. Everything else is this format's own.Fields
Methods
Parse
#Parse definition text into an existing definition. Lines that cannot be read are reported and skipped; the rest are applied.
public static bool Parse()
text,
Definition text.
definition,
Definition to add bindings to.
errors
Receives one message per faulty line, with its line number.
Returns: True if every line was read.
TryParseColour
#Parse a colour literal in CSS notation: #RGB, #RRGGBB, #RRGGBBAA, oklch(L C H), oklab(L a b) or rgb(r g b), each optionally followed by "/ alpha" where alpha is a fraction or a percentage.
Write
#WriteColour
#Write a colour literal. Colours defined in Oklab become oklch(); everything else becomes hex, rounded to the 8-bit grid. rgb() is still read, never written.
WriteDash
#Write a dash pattern as its lengths separated by spaces, or SolidDash when there are none.