| Crates.io | tinted-scheme-extractor |
| lib.rs | tinted-scheme-extractor |
| version | 0.6.1 |
| created_at | 2024-06-16 12:19:01.425875+00 |
| updated_at | 2025-03-24 15:36:41.556929+00 |
| description | A tool to create a Tinted Theming scheme based on a provided image |
| homepage | https://github.com/tinted-theming/tinted-scheme-extractor-rs |
| repository | https://github.com/tinted-theming/tinted-scheme-extractor-rs |
| max_upload_size | |
| id | 1273489 |
| size | 367,866 |
tinted-scheme-extractor is a Tinted Theming Rust library which
generates a Base16 theme based a provided image.
Note: This is early stages so the API is subject to change.
cargo add tinted-scheme-extractor
use std::path::PathBuf;
use tinted_builder::{SchemeSystem, SchemeVariant};
use tinted_scheme_extractor::{create_scheme_from_image, SchemeParams};
fn main() {
let image_path = PathBuf::from("./path/to/file.png");
let name = "Your scheme name".to_string();
let slug = "your-scheme-slug".to_string();
let description = Some("Optional description".to_string());
let variant = SchemeVariant::Dark;
let system = SchemeSystem::Base16;
let verbose = false;
let author = "Your name".to_string();
let scheme = create_scheme_from_image(SchemeParams {
image_path,
author,
description,
name,
slug,
system,
verbose,
variant,
}).unwrap();
println!("{}", &scheme);
}
Initially I wasn't sure if I wanted to continue Flavours development or to build something new. I brought this up with Misterio77 and he suggested building something new from scratch. This project is a part of rebuilding the Flavours functionality in Tinty.