Find related light mode color from dark mode color.
The existing dark color
Get a copy of known colors
Parse an existing color value, if it is in variable-based color format, extract color key, light color and query related dark color if any
The color string to parse
Whether current content is in dark mode. When set to true, if the color value is not in dark var format, we will treat is as a dark mode color and try to find a matched dark mode color.
Given a light mode color value and an optional dark mode color value, register this color so that editor can handle it, then return the CSS color value for current color mode.
Light mode color value
Whether current color mode is dark mode
Optional dark mode color value. If not passed, we will calculate one.
Reset known color record, clean up registered color variables.
Transform element color, from dark to light or from light to dark
The element to transform color
Whether this is transforming color from dark mode
Whether this is transforming color to dark mode
Generated using TypeDoc
A handler object for dark color, used for variable-based dark color solution