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

彩色主题提取器

一个基于提供的图像创建彩色主题方案的工具

7 个版本

0.3.2 2024 年 7 月 12 日
0.3.1 2024 年 7 月 12 日
0.2.2 2024 年 6 月 18 日
0.1.0 2024 年 6 月 16 日

图像 中排名第 220

Download history 399/week @ 2024-06-16 14/week @ 2024-06-23 63/week @ 2024-06-30 279/week @ 2024-07-07 64/week @ 2024-07-14 2/week @ 2024-07-21 26/week @ 2024-07-28

每月下载量 375
用于 tinty

MPL-2.0 许可证

32KB
668

彩色主题提取器

Matrix Chat Crates.io LICENSE

彩色主题提取器 是一个基于提供的图像生成 Base16 主题的 Rust 库。

注意:这处于早期阶段,API 可能会更改。

安装

cargoadd 彩色主题提取器

使用方法

use std::path::PathBuf;
use tinted_scheme_extractor::{create_scheme_from_image, SchemeParams, System, Variant};

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 = Variant::Dark;
    let system = System::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);
}

灵感

最初我并不确定是否要继续 Flavours 的开发,还是构建一些新的东西。 我与 Misterio77 进行了讨论,他建议从头开始构建一些新的东西。该项目是 Flavours 功能在 Tinty 中的重建的一部分。

依赖项

~10–22MB
~299K SLoC