Probably a copy-paste error, but `Add<Color>` and `AddAssign<Color>` should use `rhs.as_hlsa_f32()` instead of `rhs.as_linear_rgba_f32()` when the LHS is a `Color::Hsla`. Fixes #5543. Co-authored-by: Verte <105466627+vertesians@users.noreply.github.com>
This commit is contained in:
parent
aed3232e38
commit
56fc1dfe77
@ -745,7 +745,7 @@ impl AddAssign<Color> for Color {
|
||||
lightness,
|
||||
alpha,
|
||||
} => {
|
||||
let rhs = rhs.as_linear_rgba_f32();
|
||||
let rhs = rhs.as_hsla_f32();
|
||||
*hue += rhs[0];
|
||||
*saturation += rhs[1];
|
||||
*lightness += rhs[2];
|
||||
@ -794,7 +794,7 @@ impl Add<Color> for Color {
|
||||
lightness,
|
||||
alpha,
|
||||
} => {
|
||||
let rhs = rhs.as_linear_rgba_f32();
|
||||
let rhs = rhs.as_hsla_f32();
|
||||
Color::Hsla {
|
||||
hue: hue + rhs[0],
|
||||
saturation: saturation + rhs[1],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user