QCustomColorPicker
A colour selector.
A colour swatch + hex field. Clicking the swatch opens a popup of preset swatches with a "Custom..." button (QColorDialog). Emits colorChanged.
At a glance
| Tier | Free (GPLv3) |
| Import | from Custom_Widgets.QCustomColorPicker import QCustomColorPicker |
| Qt Designer | Yes — drag it from the palette |
Quick start
from Custom_Widgets.QCustomColorPicker import QCustomColorPicker
widget = QCustomColorPicker()
Dark theme
Colours come from the design tokens, so the widget follows the app theme with no extra work.
Properties
Every property below is settable in code and in Qt Designer.
| Property | Type | Default |
|---|---|---|
currentColor | color | — |
Signals
| Signal |
|---|
colorChanged(QColor) |
Methods
| Method | Description |
|---|---|
color() | Color. |
colorChanged(...) | Color changed. |
colorName() | Color name. |
currentColor(*args, **kwargs) | Current color. |
setColor(color) | Set the color. |
Theming
Colours come from the design tokens, so they follow the active theme. Roles used: focus-ring, on-surface, outline, surface, surface-muted.
See Design tokens.
Related
QCustomButtonGroup · QCustomCheckBox · QCustomComboBox · QCustomDateEdit · QCustomDateRangeEdit · QCustomDateRangePicker · QCustomEmojiPicker · QCustomFileDropZone