add WCAG contrast table, add raw OKLCH definitions
This commit is contained in:
91
DESIGN.md
91
DESIGN.md
@@ -85,19 +85,13 @@ the relevant values for making a decision. We want to ensure all accents can
|
||||
reach >4.5 WCAG 2 contrast ratio (the standard requirement for small text on
|
||||
the web) against all biome monotones for each theme:
|
||||
|
||||
+ For BG l20 (harsh, dark) -> l65 is min lightness where all accents have CR
|
||||
>=4.5
|
||||
+ For BG l25 (regular, dark) -> l65 is min lightness where all accents have CR
|
||||
>=4.5
|
||||
+ For BG l30 (soft, dark) -> l70 is min lightness where all accents have CR
|
||||
>=4.5
|
||||
+ For BG l20 (harsh, dark) -> l65 is min lightness where all accents have CR >=4.5
|
||||
+ For BG l25 (regular, dark) -> l65 is min lightness where all accents have CR >=4.5
|
||||
+ For BG l30 (soft, dark) -> l70 is min lightness where all accents have CR >=4.5
|
||||
|
||||
+ For BG l90 (harsh, dark) -> l45 is max lightness where all accents have CR
|
||||
>=4.5
|
||||
+ For BG l85 (regular, dark) -> l45 is min lightness where all accents have CR
|
||||
>=4.5
|
||||
+ For BG l80 (soft, dark) -> l40 is min lightness where all accents have CR
|
||||
>=4.5
|
||||
+ For BG l90 (harsh, dark) -> l45 is max lightness where all accents have CR >=4.5
|
||||
+ For BG l85 (regular, dark) -> l45 is min lightness where all accents have CR >=4.5
|
||||
+ For BG l80 (soft, dark) -> l40 is min lightness where all accents have CR >=4.5
|
||||
|
||||
For the monotone boundaries (l15 and l95, neither of which are possible
|
||||
backgrounds for terminal or nvim in the current theme definitions), the
|
||||
@@ -117,3 +111,76 @@ shade" of the l15-l95 shade group is l55, meaning these groups are very central
|
||||
(the light triplet could move down by one shade step, but we want these accents
|
||||
to be as bright as we can get away with; otherwise, they are extremely dull in
|
||||
the light modes, and we thus don't mind bias toward a brighter lightness).
|
||||
|
||||
The following table shows the lightness thresholds of accent colors required to achieve various
|
||||
contrast ratios under different lightness levels of monotone backgrounds. These
|
||||
ratios correspond to WCAG 2.2 standards:
|
||||
|
||||
- WCAG AA: contrast ratio ≥3:1 for large text, ≥4.5:1 for normal text
|
||||
- WCAG AAA: contrast ratio ≥4.5:1 for large text, ≥7:1 for normal text
|
||||
|
||||
The official theme variants treat WCAG AA for normal text as the sweet spot,
|
||||
but one could redefine accent selection around a more extreme contrast
|
||||
threshold as desired.
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th rowspan="2">Monotone<br>lightness</th>
|
||||
<th colspan="3">Accent lightness for contrast ratio</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>3:1</th>
|
||||
<th>4.5:1</th>
|
||||
<th>7:1</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>=15%</td>
|
||||
<td>≥50%</td>
|
||||
<td>≥60%</td>
|
||||
<td>≥75%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>=20%</td>
|
||||
<td>≥55%</td>
|
||||
<td>≥65%</td>
|
||||
<td>≥75%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>=25%</td>
|
||||
<td>≥55%</td>
|
||||
<td>≥65%</td>
|
||||
<td>≥80%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>=30%</td>
|
||||
<td>≥60%</td>
|
||||
<td>≥70%</td>
|
||||
<td>≥80%</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>=80%</td>
|
||||
<td>≤50%</td>
|
||||
<td>≤40%</td>
|
||||
<td>≤30%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>=85%</td>
|
||||
<td>≤50%</td>
|
||||
<td>≤45%</td>
|
||||
<td>≤30%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>=90%</td>
|
||||
<td>≤55%</td>
|
||||
<td>≤45%</td>
|
||||
<td>≤35%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>=95%</td>
|
||||
<td>≤60%</td>
|
||||
<td>≤50%</td>
|
||||
<td>≤40%</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user