#themes #base-16 #tinted-theming #base24

tinted-scheme-extractor

A tool to create a Tinted Theming scheme based on a provided image

11 releases (5 breaking)

0.6.1 Mar 24, 2025
0.6.0 Dec 20, 2024
0.5.0 Oct 5, 2024
0.4.0 Sep 23, 2024
0.1.0 Jun 16, 2024

#454 in Images

Download history 115/week @ 2025-07-25 43/week @ 2025-08-01 15/week @ 2025-08-08 21/week @ 2025-08-15 13/week @ 2025-08-22 29/week @ 2025-08-29 18/week @ 2025-09-05 22/week @ 2025-09-12 12/week @ 2025-09-19 9/week @ 2025-09-26 4/week @ 2025-10-03 22/week @ 2025-10-10 23/week @ 2025-10-17 15/week @ 2025-10-24 5/week @ 2025-10-31 8/week @ 2025-11-07

57 downloads per month
Used in tinty

MPL-2.0 license

44KB
695 lines

Tinted Scheme Extractor

Matrix Chat Crates.io LICENSE

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.

Install

cargo add tinted-scheme-extractor

Usage

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);
}

Inspiration

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.

Dependencies

~17–30MB
~426K SLoC