You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On non-required fields the selected color can be unselected by clicking the color again. The module also supports selecting colors via keyboard input (tab to focus color and then space/enter to select/unselect).
7
+
Please see the docs at https://www.baumrock.com/en/processwire/modules/rockcolorpicker/docs/
8
8
9
-
## Setup
10
-
11
-
The colors of your field must be defined in `/site/init.php`:
Building a GUI for this field would be extremely hard because we need a connection between the color name, css-code and the label.
62
12
63
-
## Why is there no GUI for setup?
13
+
The label might also be multi-language, and having a regular multilang textarea with language tabs would mean that we'd have to repeat all the colors for every language and also repeat all the css-codes. That's less than ideal so I chose to go with a code-only fieldtype so that one can setup colors once and then translate labels if need be.
64
14
65
-
Building a GUI for this field would be extremely hard because we need a connection between the color name, css-code and the label, but the label would need to be multi-language. Having a regular multilang textarea with language tabs would mean that we'd have to repeat all the colors for every language and also repeat all the css-codes. That's less than ideal so I chose to go with a code-only fieldtype so that one can setup colors once and then translate labels if need be.
15
+
A hook-based setup also has the benefit that you can create dynamic color-selection fields, for example having a primary and secondary color based on the client's settings or such.
A super simple color picker for the ProcessWire backend that can not only pick colors but also custom HTML (so you can use it for picking gradients, for example).
On non-required fields the selected color can be unselected by clicking the color again. The module also supports selecting colors via keyboard input (tab to focus color and then space/enter to select/unselect).
0 commit comments