Add Block widget
This commit is contained in:
parent
e31eea8178
commit
2c8f9685b9
7 changed files with 131 additions and 6 deletions
|
|
@ -1,5 +1,9 @@
|
|||
use palette::Srgba;
|
||||
|
||||
pub const TRANSPARENT: Srgba = Srgba::new(0.0, 0.0, 0.0, 0.0);
|
||||
pub const BLACK: Srgba = Srgba::new(0.0, 0.0, 0.0, 1.0);
|
||||
pub const WHITE: Srgba = Srgba::new(1.0, 1.0, 1.0, 1.0);
|
||||
|
||||
pub fn from_image_color(color: image::Rgba<u8>) -> Srgba {
|
||||
let [r, g, b, a] = color.0;
|
||||
Srgba::new(r, g, b, a).into_format()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue