Re: [csswg-drafts] [css-color-5] add target contrast ratio to color-contrast? (#4749)

When I see people talk about the `color-contrast()` function, it often looks like this [comment in another thread](https://github.com/w3c/csswg-drafts/issues/2864#issuecomment-810428789) from @argyleink:

```css
p {
  color: color-contrast(
    inherit(background-color) 
    vs 
    var(--brand-1), var(--brand-2), var(--brand-3), 
    white, black)
  ;
}
```

I like that example, but it also demonstrates this issue perfectly. Despite a list of three brand colors there, obviously the preferred values, the current function will _always_ select `black` or `white` - guaranteed to have the highest contrast. 

With browsers starting to implement `color-contrast`, I would really like to see this addressed.

-- 
GitHub Notification of comment by mirisuzanne
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4749#issuecomment-810755626 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 31 March 2021 04:42:36 UTC