color_picker
The color_picker widget edits the integer 0 to 11 behind Odoo's standard palette, the same twelve colors tags, badges and kanban cards read.
| Studio name | (selectable as widget on integer fields) |
|---|---|
| Technical name | color_picker |
| Field types | integer |
| Views | form, list, kanban |
| Module | web, present in every Odoo database |
| Used in core | 54 occurrences across 25 modules, tag configuration forms throughout (CRM, project, contacts, helpdesk-style models) |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | Partly: set the widget on an integer field in Studio's Properties |
| Alternatives | kanban_color_picker, many2many_tags, badge, color |
What the color_picker widget does
What this means for your team
Setting it up in Odoo Studio (no code)
What Studio cannot do here
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
(none) | n/a | No supportedOptions declared. Behavior is fixed: integer 0-11, full row in list views, click-to-expand elsewhere (canToggle derived from view type in extractProps). |
The expand-versus-toggle split is automatic. canToggle is computed from the view type (everything except list toggles) and cannot be forced from XML. If you need an always-expanded picker on a form, that is a small widget extension, not an option.
Working examples
One integer, four widgets
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. The development branch shows no behavior changes; see below. |
| Odoo 19.0 | Verified | Verified against the shipped source and tested on a clean database. |
| Odoo 18.0 | Verified | Same behavior. No XML changes needed. |
| Odoo 17.0 | Verified | Same behavior. No XML changes needed. |
| Odoo 16.0 | Verified | Same behavior. No XML changes needed. |
Upgrade note. Widget and palette are unchanged from Odoo 16 through 19; views carry over untouched. If custom SCSS overrode palette colors, re-test it per version, as the class names are stable but the shipped shades have shifted slightly over time.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Palette does not expand on click | The field is readonly in this context; readonly shows the swatch only. Check readonly conditions on the field and view. |
| Picked color does not appear on the tags | The consuming widget is not wired to the field: many2many_tags/badge need color_field pointing at it. Add options="{'color_field': 'color'}" on the consumer. |
| Need brand hex colors instead of the palette | The value is a palette index by design; there is no hex storage. Restyle the palette classes in SCSS if you must, or accept the 12-color vocabulary. |
| Color reverted after leaving the form without saving | Unlike the tags widget's popup, this widget does not save on pick. Save the record; the pick is a normal pending edit. |
| Widget errors on a char field | Supported type is integer only. Store the index in an integer field; use the color widget family for other needs. |
Color_picker widget vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
color_picker | Editing the palette index on tag-like models | The direct editor for the shared 0-11 color integer; no options, view-adaptive display |
| kanban_color_picker | Recoloring records from a kanban card menu | Same palette, presented in the card's dropdown |
| many2many_tags | Coloring tag pills on documents | Consumes the integer via color_field; its form popup edits it too |
| badge | Colored status pills | Read-only consumer of the same index |
| color | Free hex color values | Edits an actual color string, not a palette index |
Frequently asked questions
How do I let users pick a tag color in Odoo?+
What do the color numbers 0 to 11 mean?+
Why does the picker look different in list and form views?+
Can I add more colors or use hex values?+
Does picking a color save the record?+
Which widget recolors kanban cards?+
Building a tag taxonomy your team actually uses?
Consistent colors, locked lists and meanings everyone knows: small configuration with daily payoff. We set up tag models, palettes and the views around them as part of Odoo customization on 16 through 19.
Book a free consultation