sht-colour

sht-colour is for conversions involving SHT colour codes. SHT codes are an intuitive human-readable text format for colours. See https://omaitzen.com/sht/spec/ for the specification. Supports conversion to and from RGB/hex and parsing from text.

Example

```rust use ::sht_colour::{ rgb::{HexRGB, RGB}, Ratio, SHT, };

let redsht = "r".parse::>().unwrap(); let redhex = "#F00".parse::>().unwrap();

// RGB is the standard struct for RGB values, from the rgb crate. let redrgb = >>::new( Ratio::frominteger(1), Ratio::frominteger(0), Ratio::frominteger(0), );

// Converting between SHT and HexRGB (with a precision of 1 digit). asserteq!(redsht.torgb(1), redhex); asserteq!(redsht, redhex.tosht(1));

// Converting between HexRGB and RGB. asserteq!(>>::from(redhex), redrgb); asserteq!(redhex, >::from(redrgb)); ```