mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-20 01:14:23 +01:00
The Color Wheel panel menu gains Show Contrast, Contrast For (Normal Text, Large Text, Graphics) and Contrast Background (Behind Selection, Current Color). Show Contrast adds a row under the wheel or the box with the background's chip, the WCAG 2 contrast ratio cut off at two decimals and the AA and AAA results for the chosen category. The new color.contrast query answers the ratio and the results for a color (by default the active Fill or Stroke proxy's color, at the opacity and with the blend modes it is drawn with) against a given color or the color drawn behind the selection. ui.colorWheel takes contrast, contrastFor and contrastBackground, kept with the preferences. vectorcraft-color gains a wcag module with the relative luminance and contrast ratio definitions (https://www.w3.org/TR/WCAG22/#dfn-contrast-ratio). Docs: docs/mcp.md, docs/control-protocol.md, docs/target-app-parity.md.