feat: hsv color format implemented with rgb parsing

This commit is contained in:
2025-08-15 00:06:20 +02:00
parent 6c6ff8e420
commit 5ffeee7851
5 changed files with 199 additions and 27 deletions

View File

@@ -1,8 +1,7 @@
use clipboard::ClipboardContext;
use clipboard::ClipboardProvider;
use crate::color::Color;
use crate::color::HSL;
use crate::color::HSV;
use crate::color::RGB;
mod color;
@@ -18,8 +17,7 @@ fn main() {
println!("Hello, world!");
example();
let hsl_color = Color::from(HSL::new(0, 100, 50));
// let rgb_color = Color::from(HSL::new(193, 67, 28));
println!("RGB Color: {:X}", hsl_color);
// println!("RGB Color: {}", rgb_color.format());
let color = RGB::new(220, 10, 50);
let hsv_color = HSV::from(RGB::new(220, 10, 50));
println!("RGB color: {}, HSV Color: {}", color, hsv_color);
}