Implement gradient color interpolation option (#548)

* Added the better color averaging code (tested & functional)

* rustfmt

* Make Color f32 0..1, clarify premul/unpremul

* Fix imports and test name

* Premultiply gradient colors matching CSS

* Fix indentation

* fixup

* Add gradient image

---------

Co-authored-by: K's Thinkpad <K.T.Kraft@protonmail.com>
This commit is contained in:
Ivan Molodetskikh
2024-07-16 10:22:03 +03:00
committed by GitHub
parent 0824737757
commit 3ace97660f
27 changed files with 1092 additions and 79 deletions
+2 -2
View File
@@ -50,8 +50,8 @@ impl Layout {
border: niri_config::Border {
off: false,
width: FloatOrInt(4.),
active_color: Color::new(255, 163, 72, 255),
inactive_color: Color::new(50, 50, 50, 255),
active_color: Color::from_rgba8_unpremul(255, 163, 72, 255),
inactive_color: Color::from_rgba8_unpremul(50, 50, 50, 255),
active_gradient: None,
inactive_gradient: None,
},