Follow

RT Adam Argyle
LET CSS PICK AN ACCESSIBLE COLOR!
`color-contrast()` will automatically pick a color that passes contrast ratios, just give it a list to choose from. aka: throw colors at it!
```
body {
background: var(--blue2);
color: var(--onblue2);
}
```
Adam Argyle: Red won!
```
color-contrast(black vs blue, red, green)
```
This function returns the color which contrasts the most with the 1st color.
⚠️ LET CSS ENSURE YOU PASS CONTRAST SCORES ⚠️

:sys_twitter: twitter.com/argyleink/status/1

· · Twitter · 0 · 0 · 0
Sign in to participate in the conversation
小森林

每个人都有属于自己的一片森林,也许我们从来不曾走过,但它一直在那里,总会在那里。迷失的人迷失了,相逢的人会再相逢。愿这里,成为属于你的小森林。