Skip to content

hwb parsing and rounding #104

@waywardmonkeys

Description

@waywardmonkeys

In the WPT, there's a test for parsing hwb(120 30% 50%) which says it should return rgb(77, 128, 77).

Instead, it returns rgb(76, 128, 76) using this code:

let check_color = parse_color(check).unwrap().to_alpha_color::<Srgb>().to_rgba8();
let result_color = parse_color(result).unwrap().to_alpha_color::<Srgb>().to_rgba8();
assert_eq!(check_color, result_color);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions