Tags » rust » palette
-
TIL: Get a Palette colour as a command-line argument with Clap
Wrapping a
Palette:Srgb
in a struct and implementingFromStr
for the struct allows you to take hexadecimal colours as command-line inputs. -
TIL: How to use hex colours with the palette crate
You can use
Srgb::from_str()
to parse a hexadecimal string as a colour in the palette crate.