diff options
| -rw-r--r-- | niri-config/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs index 736f976e..f00eed9c 100644 --- a/niri-config/src/lib.rs +++ b/niri-config/src/lib.rs @@ -348,7 +348,8 @@ impl Color { impl From<Color> for [f32; 4] { fn from(c: Color) -> Self { - [c.r, c.g, c.b, c.a].map(|x| x as f32 / 255.) + let [r, g, b, a] = [c.r, c.g, c.b, c.a].map(|x| x as f32 / 255.); + [r * a, g * a, b * a, a] } } |
