Skip to content

[css-color-4] Computed/used value of color doesn't specify how to serialize. #1891

Closed
@AmeliaBR

Description

@AmeliaBR

The section "Resolving Color values" in CSS Colors 4 makes it explicit that computed & used values for color should use rgb or rgba notation.

But it doesn't say whether to use the (0-255) format or percentages. Quick test suggest that integer format is preferred by browsers.

On high-color-depth monitors, converting all colors to integers could mean a loss of data, if the numbers were always rounded off to a nearest integer. But since the latest specs allow decimals in the 0-255 syntax, maybe the rounding could be left as implementation-dependent?

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