Skip to content

Support gradient backgrounds #34

Open
@chris-morgan

Description

@chris-morgan

If you enter linear-gradient(lime, green) as the value for the background, it’ll render it, but its calculations are off, because it’s interpreting it as a semi-transparent background.

It should instead calculate the range of contrast ratios, probably by sampling a bunch of colours on the gradient and considering them individually.

(Pathological example: grey on linear-gradient(white, black) has contrast ratios in the range 1–5.31, but if you only sampled the two ends of the gradient you’d get the answer 3.94–5.31.)

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