Add List component

This commit is contained in:
Marshall Bowers
2023-10-04 18:25:43 -04:00
parent 332f3f5617
commit 77feecc623
10 changed files with 777 additions and 12 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ use serde::de::{self, Deserialize, Deserializer, Visitor};
use std::fmt;
use std::num::ParseIntError;
pub fn rgb(hex: u32) -> Rgba {
pub fn rgb<C: From<Rgba>>(hex: u32) -> C {
let r = ((hex >> 16) & 0xFF) as f32 / 255.0;
let g = ((hex >> 8) & 0xFF) as f32 / 255.0;
let b = (hex & 0xFF) as f32 / 255.0;