1 unstable release

0.1.0 Feb 27, 2021

#580 in Images

Download history 34/week @ 2023-12-11 34/week @ 2023-12-18 16/week @ 2023-12-25 13/week @ 2024-01-01 45/week @ 2024-01-08 34/week @ 2024-01-15 15/week @ 2024-01-22 17/week @ 2024-01-29 41/week @ 2024-02-05 41/week @ 2024-02-12 45/week @ 2024-02-19 81/week @ 2024-02-26 50/week @ 2024-03-04 56/week @ 2024-03-11 58/week @ 2024-03-18 88/week @ 2024-03-25

260 downloads per month
Used in 8 crates (3 directly)

MIT license

48KB
914 lines

color-maps

A simple crate which provides html and X color map with names (as keys) and their (r, g, b) values.

Usage

[dependencies]
color-maps = "0.1"
use color_maps::*;

fn main() {
    let html_black = html::HTML_MAP.get("Black").unwrap();
    assert_eq!(*html_black, (0, 0, 0));
    
    let x_black = x::X_MAP.get("black").unwrap();
    assert_eq!(*x_black, (0, 0, 0));
}

lib.rs:

color-maps

A simple crate which provides html and X color map with names (as keys) and their (r, g, b) values.

Usage

[dependencies]
color-maps = "0.1"
use color_maps::*;

fn main() {
    let html_black = html::HTML_MAP.get("Black").unwrap();
    assert_eq!(*html_black, (0, 0, 0));
   
    let x_black = x::X_MAP.get("black").unwrap();
    assert_eq!(*x_black, (0, 0, 0));
}

Dependencies

~11KB