Color picker
Color pickers let users choose a color value.
Use the native <input type="color"> element to let users select a color.
Use cases
Section titled “Use cases”Make sure the color picker is suitable for your use case. There may be other, more appropriate components available.
| Use case | Color picker | Select | TextField |
|---|---|---|---|
| Choose a value from a color field | ✅ | ❌ | ❌ |
| Pick between a small number of predefined choices | ❌ | ✅ | ❌ |
| Enter a color code value | ❌ | ❌ | ✅ |
- Use a clear, descriptive label to explain what the color controls.
- Display the selected color so users can confirm the result.
- Use the native color input to select a single color.
- Use a separate control to adjust the color’s
alphavalue.
🚫 Don’t
Section titled “🚫 Don’t”- Don’t use a native color input to limit selection to one of predefined color values.