Single-line text box and a color picker to pick a color. The color can also be typed into the text box, such as #123456. An attribute of type="popup" shows a button that, when clicked, opens a color picker popup.
Initial color value, in hexadecimal notation for the combination of Red, Green, and Blue color values (RGB).
Size of input field, in number of characters
CSS class of input field or the rectangular color block
Style of input field or the rectangular color block
style="width: 190px; height: 32px"
Type of color widget: • "below" - color picker is located below the input field; • "popup" - pop-up a color picker window when clicking the button next to the input field (this uses very little vertical space); • "view" - a read-only rectangular block colored in the color value (no color picker); • "view-hex" - like view, in addition shows the color value as an RGB hexadecimal code (no color picker);
Additional parameters can be supplied; they will be added to the HTML input field or the rectangular color block.
Test: (this only works if the ColorPickerPlugin is installed and enabled)
Using the color picker with disabled plugin
It is also possible to use the color picker in HTML forms with disabled ColorPickerPlugin:
This will show an HTML input field named "demo_color" and a color picker tied to it. The "code" section should be included once per topic, the "picker" section can be included as many times as needed. The NAME parameter is required; SIZE, VALUE and EXTRA parameters are optional. Use the EXTRA parameter to add additional parameters to the HTML input field.
Test: (this works only if the ColorPickerPlugin is installed and disabled)
This plugin is pre-installed. TWiki administrators can upgrade the plugin as needed on the TWiki server.
TWikibug:Item7577: TWiki form field type with configure attributes, color type supports form, onblur, onfocus, onchange, onselect, onmouseover, onmouseout, pattern, placeholder, spellcheck, style, tabindex, title, translate
TWikibug:Item7148: Fix for color picker not working if initial value of TWiki forms field of type color is empty
TWikibug:Item7091: Dependency clarification; use TWISTY for installation instructions