Skip to content

[css-images-3] Allow dithering as a gradient-painting strategy #4793

Description

@tabatkins

Currently, the Images spec strictly defines the color of each pixel in a gradient - the gradient-line is colored according to the defined interpolation between color stops, and then the image is painted according to what point on the gradient line a given pixel is closest to.

However, WebKit apparently dithers its gradients to produce a smoother overall appearance. I think this should be allowed! Random dithering is a great rendering strategy for making gradients look even smoother, especially when the endpoints are fairly close in color-space; it avoids the hard line where the color shifts up or down one channel-unit, which can be pretty visible in some circumstances.

So I propose that we add some normative text to allow dithering as a rendering strategy. I don't think we need to put in any strict requirements on how far from ideal the dithering is allowed to be; we can leave that up to QoI and just rely on reasonable fuzzy-matching for reftests.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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