mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-11 12:33:25 -08:00
[Icons] Order the emphasis ladder by chroma, not contrast
Contrast cannot order the ladder. On a dark surface the highest-contrast tone is the palest one, so a 7:1 primary came out near-white while the secondary kept the family's color; the ladder read inverted, and for the shipped semantic greens and reds the primary level was already satisfied by the secondary, so the two levels resolved to the same hex. Emphasis is chromatic intensity now. Quiet recedes toward the surface at the 3:1 non-text floor, secondary keeps the family color at the 4.5:1 text floor, and primary is the most chromatic tone the same floor allows. Every level stays legible on the window and the button surface, and the primary is a strictly more saturated member of its family on both schemes. The reformatted palettes move the two upper levels onto the shared floor and leave the quiet level alone.
This commit is contained in:
parent
2e4731d3a5
commit
daa1a73956
13 changed files with 135 additions and 84 deletions
|
|
@ -99,11 +99,12 @@ double labelContrastFloor();
|
|||
/**
|
||||
* @brief Applies an emphasis level to an already-hued glyph color.
|
||||
*
|
||||
* Secondary keeps the hue untouched, so it is the no-op the default needs.
|
||||
* Primary pushes the color to a higher floor than the default, because the
|
||||
* accent is a mid-tone: on a light scheme it is lighter than the neutral ink and
|
||||
* on a dark one darker, so only a stronger contrast target keeps the primary
|
||||
* level above the secondary on both. Quiet
|
||||
* Secondary keeps the color untouched, so it is the no-op the default needs.
|
||||
* Primary is the most chromatic member of its family: it raises the saturation
|
||||
* to the most that still clears the text floor. Contrast alone cannot order the
|
||||
* ladder, because on a dark surface the highest-contrast tone is the palest one;
|
||||
* a primary that reads as a washed-out version of the secondary is exactly the
|
||||
* inversion this rule removes. Quiet
|
||||
* blends the color toward the surface it sits on and stops at the non-text
|
||||
* legibility floor, so a labelling glyph recedes without disappearing.
|
||||
*
|
||||
|
|
@ -114,7 +115,7 @@ double labelContrastFloor();
|
|||
*/
|
||||
QColor forEmphasis(const QColor &color, const QColor &surface, IconEmphasis emphasis);
|
||||
|
||||
/** @brief Contrast floor the primary level reaches, so it out-reads the default. */
|
||||
/** @brief Contrast floor the primary level reaches, so it stays legible. */
|
||||
double primaryContrastFloor();
|
||||
|
||||
/** @brief How far a quiet glyph is blended into its surface. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue