I have a theme that lets users pick a colour, bur I would like to have them as oklch values instead of hexadecimal. The Grav documentation says nothing about such an option, but I would like to make sure before I go hacking that…
If there is indeed no built in option for that, this would be my plan:
- add a php library with colour conversion functions to my theme
- hook into
onAdminSave - convert hex to oklch
- save with the new value
Any ideas would be much appreciated!