1 unstable release

0.1.0 Feb 27, 2021

#585 in Images

Download history 38/week @ 2024-01-06 43/week @ 2024-01-13 18/week @ 2024-01-20 18/week @ 2024-01-27 30/week @ 2024-02-03 37/week @ 2024-02-10 59/week @ 2024-02-17 65/week @ 2024-02-24 47/week @ 2024-03-02 63/week @ 2024-03-09 57/week @ 2024-03-16 78/week @ 2024-03-23 97/week @ 2024-03-30 55/week @ 2024-04-06 66/week @ 2024-04-13 65/week @ 2024-04-20

293 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