mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +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
|
@ -549,9 +549,9 @@ public:
|
|||
break;
|
||||
}
|
||||
|
||||
u8 out_r = (u8)(r * 255);
|
||||
u8 out_g = (u8)(g * 255);
|
||||
u8 out_b = (u8)(b * 255);
|
||||
auto out_r = static_cast<u8>(round(r * 255));
|
||||
auto out_g = static_cast<u8>(round(g * 255));
|
||||
auto out_b = static_cast<u8>(round(b * 255));
|
||||
return Color(out_r, out_g, out_b);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue