[go: up one dir, main page]

colorous 1.0.1

Professional color schemes ported from d3-scale-chromatic
Documentation
1
2
3
4
5
6
7
8
9
use colorous::Color;

#[test]
fn test_hex() {
    let (r, g, b) = (10, 100, 255);
    let color = Color { r, g, b };
    assert_eq!("0a64ff", format!("{:x}", color));
    assert_eq!("0A64FF", format!("{:X}", color));
}