Skip to main content

QCustomColorPicker

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

TierFree (GPLv3)
Importfrom Custom_Widgets.QCustomColorPicker import QCustomColorPicker
Qt DesignerYes — 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.

QCustomColorPicker in dark theme

Signals

Signal
colorChanged(QColor)

Methods

MethodDescription
color()Color.
colorChanged(...)Color changed.
colorName()Color name.
setColor(color)Set the color.

Theming

Colours come from the design tokens, so they follow the active theme. Roles used: surface, on-surface, surface-muted, outline, accent.

See Design tokens.

QCustomButtonGroup · QCustomCheckBox · QCustomComboBox · QCustomDateEdit · QCustomDateRangePicker · QCustomEmojiPicker · QCustomFileDropZone · QCustomForm