1 unstable release

0.1.0 Feb 27, 2021

#693 in Images

Download history 36/week @ 2024-11-16 53/week @ 2024-11-23 59/week @ 2024-11-30 81/week @ 2024-12-07 92/week @ 2024-12-14 23/week @ 2024-12-21 22/week @ 2024-12-28 55/week @ 2025-01-04 107/week @ 2025-01-11 74/week @ 2025-01-18 39/week @ 2025-01-25 86/week @ 2025-02-01 97/week @ 2025-02-08 62/week @ 2025-02-15 76/week @ 2025-02-22 47/week @ 2025-03-01

302 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