mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-22 09:29:24 +01:00
This commit introduces the ability for users to specify colours in the static config file in either RGB or Hex format. This is done by introducing a new enum, Colour, which provides variants wrapping the internal Rgb type, and the HexColour type from the hex_colour crate. HexColour itself is wrapped in a new struct, Hex, in order to allow the implementation of the JsonSchema trait. A number of From<T> implementations have been done in order to make working with the Colour enum more ergonomic. Ultimately, the core representation for colours in komorebi remains the Rgb struct, any and Hex-specified colours will be converted to this Rgb type before being converted to u32 to pass them on to various Win32 API calls.
21 KiB
21 KiB