mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
Without this change the math in `CSSHWB::to_color()` is lacking some precision to generate the correct value to hand to `Color::from_hsv()`. More precisely, when converting `hwb(120 20 30)`, the HSV's value would be calculated as `1 - .3`. However, it turns out that `1 - .3f != .7f` and `1 - .3f` gives bad results down the road in `Color::from_hsv()`. This example actually only requires `resolve_with_reference_value()` to return a double. I changed the two others for symmetry.