NTH> Colorpicker form widget with "allowCustomColor"

Regarding documentation, i miss one feature in colorpicker widget - disable “custom color”.

For example: you need to use a brand identity colorset and disallow to use another colors, then, when is used colorpicker widget, there are always “custom color” available.

Second thing… Probably most of us uses tailwind, bootstrap, etc. then if we can use colorsets from these like allowedColors: [‘primary’,‘secondary’,‘danger’,‘warning’,‘info’, …] or using a key=>value ? or ‘key:value’ ?

With new config attribute (allowCustomColor by default as true) it will be possieble to disable custom color feature. What u guys thinks?

And… of course…
We need a new Topic in this talk / Ideas / Feature requests?

2 Likes

and, probably, can have same behaviour as dropdown field with options. there are implemented
type:dropdown
options:
key : value
key2: value2

Sounds like a good idea. We have added allowCustom in v3.2, you can set this to false to disable the selection of custom colors.

Not sure about the bootstrap classes, this widget will likely remain a HEX color picker.

1 Like