1 unstable release

0.1.0 Feb 27, 2021

#654 in Images

Download history 49/week @ 2024-07-22 52/week @ 2024-07-29 46/week @ 2024-08-05 70/week @ 2024-08-12 44/week @ 2024-08-19 60/week @ 2024-08-26 82/week @ 2024-09-02 65/week @ 2024-09-09 70/week @ 2024-09-16 65/week @ 2024-09-23 45/week @ 2024-09-30 9/week @ 2024-10-07 49/week @ 2024-10-14 209/week @ 2024-10-21 42/week @ 2024-10-28 55/week @ 2024-11-04

356 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

~10KB