mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibGfx: Round values in Color::from_hsv()
This commit is contained in:
parent
009f328308
commit
b4ba65c6e5
Notes:
github-actions[bot]
2024-11-21 12:01:04 +00:00
Author: https://github.com/LucasChollet
Commit: b4ba65c6e5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2390
Reviewed-by: https://github.com/gmta
3 changed files with 14 additions and 3 deletions
|
@ -21,3 +21,9 @@ TEST_CASE(all_green)
|
|||
EXPECT_EQ(Color(Color::NamedColor::Green), Color::from_xyz50(0.385152, 0.716887, 0.097081));
|
||||
EXPECT_EQ(Color(Color::NamedColor::Green), Color::from_xyz65(0.357584, 0.715169, 0.119195));
|
||||
}
|
||||
|
||||
TEST_CASE(hsv)
|
||||
{
|
||||
EXPECT_EQ(Color(51, 179, 51), Color::from_hsv(120, 0.714285714, .7));
|
||||
EXPECT_EQ(Color(87, 128, 77), Color::from_hsv(108, 0.4, .5));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue