1 unstable release

0.1.0 Feb 27, 2021

#684 in Images

Download history 46/week @ 2024-10-16 204/week @ 2024-10-23 55/week @ 2024-10-30 35/week @ 2024-11-06 28/week @ 2024-11-13 48/week @ 2024-11-20 57/week @ 2024-11-27 59/week @ 2024-12-04 107/week @ 2024-12-11 51/week @ 2024-12-18 17/week @ 2024-12-25 39/week @ 2025-01-01 67/week @ 2025-01-08 97/week @ 2025-01-15 60/week @ 2025-01-22 57/week @ 2025-01-29

286 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