public static class NamedColorsThe CSS colour keywords.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
A short list rather than all hundred and forty-eight, and the reason it is needed at all is worth stating: ExCSS resolves color: red to rgb(255, 0, 0) before Vixen sees it, so this table would be dead code — except that a value reached through a var() is passed through verbatim and arrives as the word. So a keyword reaches here only via a custom property, and the ones people put in custom properties are the basic sixteen plus transparent.
Anything not here is a keyword rather than a colour, which is the correct outcome for a name this engine does not know: color: papayawhip becomes a value that does not interpolate rather than a wrong colour that does.
Methods (1)
public static bool TryGet(ReadOnlySpan<char> name, out Color colour)Looks a colour keyword up.
Used by (1)
- StyleValueParserVixen.Ui.Styling