Skip to content

[css-color-4] no contrast guarantee on semi-transparent colors #1628

@xi

Description

@xi

https://drafts.csswg.org/css-color-4/#contrast-adjuster

The heading of this section "Guaranteeing Adequate Contrast" is misleading because the algorithm ignores the alpha channel. A note should be added that warns about this detail.

I do not think that the contrast adjuster should take alpha into account. This would require more context ("is it background or font color?", "if it is background, what is behind that?"). Ignoring the context would mean to assume worst case. See also this article for an in-depth discussion of this topic.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions