Modifier

References
public abstract class Modifier
A step applied to an inherited value on its way from the source property to the property that inherits it. Colour modifiers work in Oklab, so equal amounts look like equal changes. Amounts are integer percentages (or whole degrees for hue), which is as fine as the UI needs. The set of modifiers is closed; the nested types are all there are.

Properties

Dependencies

#
Gets the properties this modifier reads besides the value it modifies. Most modifiers read none; a mix towards another property reads that one.
public virtual PropertyId[] Dependencies { get; }

Kind

#
public abstract PropertyType Kind { get; }

Methods

Apply

#
public abstract SkinValue Apply()

ToString

#
public override string ToString()
Object.ToString

ToText

#
Write this modifier the way it appears in a skin definition file, for example "Luminance -20%".
public abstract string ToText()

TryParse

#
Parse a modifier from its text form.
public static bool TryParse(
text,
Text such as "Luminance -20%", "Hue +30°", "Mix #C0EB75 80%" or "Scale 150%".
modifier,
Parsed modifier.
out string
error
Reason for failure, or null.
)

WithoutReferences

#
A copy of this modifier with every property reference replaced by the colour it resolves to right now, so the modifier can be applied without a definition at hand. Modifiers without references return themselves.
public virtual Modifier WithoutReferences()