This will invoke the standard color picker widget to select a color. This has mechanisms to get a color from your data and to set a new color into your data. This is performed by two attribute functions.
Parameters
None
Attributes
- getF( getFF:Fstring) – this is a string with an HTML hex color specification or a function that will return such a string. This is how the color picker gets the current color from your data. This is called each time the component is rendered.
- setF( setFF:(color:string)=>void ) – whenever the color picker changes its color, the setFF function will be called. Inside this function is where you set the color into your application’s data.
Examples
new ColorPickerUI().getF(()=>{ return mydata.color; }).setF((color:string)=>{ mydata.color = color; ZUI.notify(); // so the UI gets redrawn })
Styling
- ColorPickerUI – this is the default style class.