Skip to content

colors in html5 #3

@xujihui1985

Description

@xujihui1985

Restricting Color Well Selection

By default the “well” that appears offers the user the entire color gamut to choose from. With the same principle as the range input, the user’s choices can be directed to just a few colors by using a with appropriate values:

<input type="color" value="#333333" list="colors">
<datalist id=colors>
  <option>#ffffff</option>
  <option>#ff0000</option>
  <option>#ff7700</option>
</datalist>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions