Color Field Input Options (HEX, HSL, RGB, etc) #10965
Unanswered
richhayler
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When creating a color field, it would be great to have the option to specify the type of input - i.e. HEX, HSL, RGB or RGBA
Currently the input only accepts hexadecimal values and while there are methods available to translate HEX values to alternative color formats, it would be great to have the option to provide inputs in the intended format up front.
Craft Color Fields
A specific example I have in mind is programatically manipulating color inputs to define a theme for a website. In my use case I am generating additional tones for a specific inputted color will requires translating the HEX value to HSL, extracting the "L (lightness)" value, manipulating this value (increasing/decreasing), reapplying the updated value to the HSL array and converting that back to HEX.
In this case capturing the data as HSL would not only reduce a step but allow a specific/deliberate L value to be entered.
Beta Was this translation helpful? Give feedback.
All reactions