Sem Abraham Sem Abraham - 1 year ago 90
Javascript Question

Extjs 6.0 colorpicker HEX field

I'm using the ExtJS colorpicker to set colors for my website. However I already use certain specific colorcodes that I want. But when I load in the colorpicker, I can't put in my own colorcodes. Does anyone know how to make that field editable? Thanks in advance.

Answer Source

As of now, the HEX field is lacking the possibility to parse a hex value and set it correctly into all the other fields of the picker - this is why the field is set to readOnly.

You can always read, understand and override/extend the existing code to fit your needs.

The field already parses hex color codes correctly if you provide them via setValue(), so you would only have to follow that path to find the parse function you can hook into.

I guess it's no more than four hours of work, including testing.