First working version with all options except grace

This commit is contained in:
2026-03-07 21:48:24 +01:00
parent 7cdcf19415
commit 88f7833d8d
10 changed files with 712 additions and 1663 deletions
-20
View File
@@ -38,23 +38,3 @@ pub fn parse_vignette_effect(s: &str) -> Result<(f32, f32), String> {
let factor = parts[1].parse().map_err(|_| "Invalid factor")?;
Ok((base, factor))
}
/// Convert hex color string to RGBA color struct
pub fn hex_to_rgba(hex: &str) -> Color {
let (r, g, b, a) = parse_hex_color(hex).unwrap_or((0.0, 0.0, 0.0, 1.0));
Color {
r: (r * 255.0) as u8,
g: (g * 255.0) as u8,
b: (b * 255.0) as u8,
a: (a * 255.0) as u8,
}
}
/// RGBA color struct
#[derive(Debug, Clone, Copy)]
pub struct Color {
pub r: u8,
pub g: u8,
pub b: u8,
pub a: u8,
}