Function chroma_rust::valid
source · Expand description
checking if a color can be parsed by chroma-rust
you can use chroma_rust::valid
to try if a color argument can be correctly parsed as color by chroma_rust
.
chroma_rust::valid("red");
chroma_rust::valid("bread");
chroma_rust::valid("#F0000D");
chroma_rust::valid("#FOOOOD");