m (Text replacement - "|Subject version=2.0,2.1" to "|Subject version=2.0,2.1,2.5") |
|||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 2: | Line 2: | ||
color | color | ||
===Type=== | ===Type=== | ||
input | |||
===Synopsis=== | ===Synopsis=== | ||
How to render a color input field | How to render a color input field | ||
| Line 13: | Line 13: | ||
===Example=== | ===Example=== | ||
<syntaxhighlight lang="html"> | <syntaxhighlight lang="html"> | ||
< | <input type="color" value="#ff0000" /> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<input type="color" value="#ff0000" /> | |||
===Note=== | ===Note=== | ||
When adding a standard value to a color field that is not a solid color or a number in HEX notation, the result will always be #000000 (in other words: black) | When adding a standard value to a color field that is not a solid color or a number in HEX notation, the result will always be #000000 (in other words: black) | ||
===Links=== | ===Links=== | ||
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color | https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color | ||
| ws-class-props | |||
|---|---|---|---|
| Line 1: | Line 1: | ||
{{ | {{Csp class properties | ||
|Subject version=2.0 | |Subject version=2.0,2.1,2.5 | ||
|Doc subject=DevOps:Doc/FlexForm | |Doc subject=DevOps:Doc/FlexForm | ||
|Doc parent=DevOps:Doc/FlexForm/1.0/input | |Doc parent=DevOps:Doc/FlexForm/1.0/input | ||
Latest revision as of 10:12, 21 August 2025
Name
color
Type
input
Synopsis
How to render a color input field
Description
Elements of type "color" provide a user interface element that lets a user specify a color, either by using a visual color picker interface or by entering the color into a text field in "#rrggbb" hexadecimal format. Only simple colors (with no alpha channel) are allowed.
Parameters
type="color"
All other valid parameters for an input field are valid
Example
<input type="color" value="#ff0000" />
Note
When adding a standard value to a color field that is not a solid color or a number in HEX notation, the result will always be #000000 (in other words: black)
Links
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color