feat: basic conversion

This commit is contained in:
2025-08-10 23:01:26 +02:00
parent 2e125ac301
commit 237c901225
10 changed files with 276 additions and 76 deletions

View File

@@ -2,11 +2,10 @@ use clipboard::ClipboardContext;
use clipboard::ClipboardProvider;
pub mod core;
mod transmuter;
mod formats;
use formats::colors::{Color, RGB};
#[cfg(test)]
#[path = "./test/transmuter.test.rs"]
mod test;
use crate::formats::colors::HSL;
fn example() {
let mut ctx: ClipboardContext = ClipboardProvider::new().unwrap();
@@ -17,4 +16,9 @@ fn example() {
fn main() {
println!("Hello, world!");
example();
let hsl_color = Color::from(HSL::new(193, 67, 28));
let rgb_color = Color::from(RGB::from(HSL::new(193, 67, 28)));
println!("HSL Color: {}", hsl_color.format());
println!("RGB Color: {}", rgb_color.format());
}