Theme Color#
You can customize your theme color with the argument custom_colors of qdarktheme.setup_theme, qdarktheme.load_stylesheet and qdarktheme.load_palette.
import qdarktheme
qdarktheme.setup_theme(custom_colors={"primary": "#D0BCFF"})
To customize a specific theme only, use the following syntax:
import qdarktheme
qdarktheme.setup_theme(
custom_colors={
"[dark]": {
"primary": "#D0BCFF",
}
}
)
Color formats#
Format |
Example |
|---|---|
Case-insensitive hex RGB or RGBA string. |
|
Case-insensitive RGB or RGBA string equivalent hex shorthand of duplicated characters. |
|
List of customizable colors#
Base colors#
Base color for application.
backgroundOverall background color. This color is only used if not overridden by a widget.
Inherited by
listpanelpopuptabletextareatitleDefault(light)
#f8f9fa
Default(dark)
#202124
borderOverall border color. This color is only used if not overridden by a widget.
Inherited by
inputDefault(light)
#dadce0
Default(dark)
#3f4042
foregroundOverall foreground color. This color is only used if not overridden by a widget.
Inherited by
defaultButton.disabledBackgrounddisableddisabledSelectionBackgroundiconicon.unfocusedinput.placeholderprogressBar.disabledBackgroundslider.disabledBackgroundsliderTrack.inactiveBackgroundDefault(light)
#4d5157
Default(dark)
#e4e7eb
foreground>disabledOverall foreground color for disabled elements. This color is only used if not overridden by a widget.
Inherits
foregroundDefault(light)
#4d515766
Default(dark)
#e4e7eb66
foreground>disabledSelectionBackgroundOverall background color for the selected item when widgets are disabled.
Inherits
foregroundDefault(light)
#4d51573f
Default(dark)
#e4e7eb33
foreground>iconThe default color for icons.
Inherits
foregroundDefault(light)
#494d53
Default(dark)
#e1e5e9
foreground>icon.unfocusedThe default color for icons when unfocused. Currently, this color is only used for unselected tab close button of QTabBar.
Inherits
foregroundDefault(light)
#4d515799
Default(dark)
#e4e7eb99
primaryAccent color.
Inherited by
button.activeBackgroundbutton.hoverBackgrounddefaultButton.activeBackgrounddefaultButton.hoverBackgroundlist.inactiveSelectionBackgroundlist.selectionBackgroundprogressBar.backgroundselection.backgroundsliderHandle.activeBackgroundtable.selectionBackgroundtable.inactiveSelectionBackgroundtextarea.selectionBackgroundDefault(light)
#1a73e8
Default(dark)
#8ab4f7
primary>selection.backgroundOverall background color when selected item or texts. This color is only used if not overridden by a widget.
Inherits
primaryDefault(light)
#619eef7f
Default(dark)
#5f9af466
Input#
Colors for QAbstractSpinBox, QSpinBox, QComboBox and QLineEdit.
input.backgroundBackground color for QAbstractSpinBox, QComboBox and QLineEdit.
Default(light)
#f8f9fa
Default(dark)
#3f4042
inputButton.hoverBackgroundHover background color of button in QAbstractSpinBox.
Default(light)
#00000018
Default(dark)
#ffffff25
border>inputBorder color for QAbstractSpinBox, QComboBox and QLineEdit.
Inherits
borderDefault(light)
#dadce0
Default(dark)
#3f4042
foreground>input.placeholderQLineEdit and QComboBox(editable) foreground color for placeholder text.
Inherits
foregroundDefault(light)
#4d515799
Default(dark)
#e4e7eb99
Link colors#
Colors for link.
linkVisitedForeground color for already visited hyperlinks.
Default(light)
#660098
Default(dark)
#c58af8
Lists and trees#
Colors for QListView/QListWidget and QTreeView/QTreeWidget and QColumnView.
list.alternateBackgroundBackground color for QListView/QListWidget, QTreeView/QTreeWidget and QColumnView alternating rows.
Default(light)
#00000009
Default(dark)
#ffffff0c
list.hoverBackgroundQListView/QListWidget, QTreeView/QTreeWidget and QColumnView background color when hovering over items using the mouse.
Default(light)
#00000013
Default(dark)
#ffffff13
tree.inactiveIndentGuidesStrokeQTreeView stroke color for indent guides when QTreeView is inactive.
Default(light)
#00000030
Default(dark)
#ffffff35
tree.indentGuidesStrokeQTreeView stroke color for indent guides.
Default(light)
#00000050
Default(dark)
#ffffff60
treeSectionHeader.backgroundQTreeView section header background color.
Default(light)
#dadce0
Default(dark)
#3f4042
background>listBackground color for QListView/QListWidget, QTreeView/QTreeWidget and QColumnView.
Inherits
backgroundDefault(light)
#f8f9fa
Default(dark)
#202124
primary>list.inactiveSelectionBackgroundQListView/QListWidget, QTreeView/QTreeWidget and QColumnView background color for the selected item when the widget is inactive.
Inherits
primaryDefault(light)
#0d418516
Default(dark)
#d2e3fc26
primary>list.selectionBackgroundBackground color for QListView/QListWidget, QTreeView/QTreeWidget and QColumnView when selected item or texts.
Inherits
primaryDefault(light)
#4990ed59
Default(dark)
#4288f266
Panel#
Colors for panel.
background>panelBackground color of QFrame when the frameShape property is Panel.
Inherits
backgroundDefault(light)
#ffffff
Default(dark)
#161719
Popup#
Colors for QMenu and QToolTip.
popupItem.checkbox.backgroundBackground color of QCheckBox in QMenu.
Default(light)
#00000019
Default(dark)
#ffffff19
popupItem.selectionBackgroundBackground color of the selected item in the QMenu.
Default(light)
#00000022
Default(dark)
#ffffff22
background>popupBackground color for QToolTip, QMenu and dropdown of QComboBox.
Inherits
backgroundDefault(light)
#ffffff
Default(dark)
#2a2b2f
Progress bar#
Colors for QProgressBar.
foreground>progressBar.disabledBackgroundActive indicator color of QProgressBar when disabled.
Inherits
foregroundDefault(light)
#4d51573f
Default(dark)
#e4e7eb33
primary>progressBar.backgroundActive indicator color of QProgressBar.
Inherits
primaryDefault(light)
#4990ed
Default(dark)
#669ff5
Scrollbar control#
Colors for QScrollBar.
scrollbar.backgroundQScrollBar background color. Available on OS other than mac.
Default(light)
#00000010
Default(dark)
#ffffff10
scrollbarSlider.activeBackgroundQScrollbar slider background color when clicked on.
Default(light)
#00000060
Default(dark)
#ffffff60
scrollbarSlider.backgroundQScrollbar slider background color.
Default(light)
#00000040
Default(dark)
#ffffff30
scrollbarSlider.disabledBackgroundScrollbar slider background color when disabled.
Default(light)
#00000015
Default(dark)
#ffffff15
scrollbarSlider.hoverBackgroundQScrollbar slider background color when hovering.
Default(light)
#00000050
Default(dark)
#ffffff45
Slider control#
Colors for QSlider.
foreground>slider.disabledBackgroundActive track and handle color of QSlider when disabled.
Inherits
foregroundDefault(light)
#4d51573f
Default(dark)
#e4e7eb33
foreground>sliderTrack.inactiveBackgroundInactive track color of QSlider.
Inherits
foregroundDefault(light)
#4d515733
Default(dark)
#e4e7eb19
primary>sliderHandle.activeBackgroundQSlider handle color when pressing or hovering over the handle using the mouse.
Inherits
primaryDefault(light)
#4990ed
Default(dark)
#6aa1f5
Statusbar colors#
Colors for QStatusBar.
statusBar.backgroundQStatusBar background color.
Default(light)
#dfe1e5
Default(dark)
#2a2b2e
statusBarItem.activeBackgroundQStatusBar item background color when clicking.
Default(light)
#00000024
Default(dark)
#ffffff34
statusBarItem.hoverBackgroundQStatusBar item background color when hovering.
Default(light)
#00000015
Default(dark)
#ffffff22
Table#
Colors for QTableView/QTableWidget.
table.alternateBackgroundBackground color for QTableView/QTableWidget alternating rows.
Default(light)
#00000012
Default(dark)
#ffffff15
tableSectionHeader.backgroundQTableView/QTableWidget section header background color.
Default(light)
#dadce0
Default(dark)
#3f4042
background>tableQTableView/QTableWidget background color.
Inherits
backgroundDefault(light)
#ffffff
Default(dark)
#101012
primary>table.selectionBackgroundQTableView/QTableWidget background color when selected item.
Inherits
primaryDefault(light)
#3282ea7f
Default(dark)
#4288f28c
primary>table.inactiveSelectionBackgroundQTableView/QTableWidget background color for the selected item when the widget is inactive.
Inherits
primaryDefault(light)
#0d418516
Default(dark)
#d2e3fc2d
Tabs#
Colors for QTabBar.
tab.activeBackgroundActive Tab background color in an QTabBar.
Default(light)
#00000000
Default(dark)
#ffffff00
tab.hoverBackgroundTab background color when hovering in an QTabBar.
Default(light)
#00000015
Default(dark)
#ffffff18
tabCloseButton.hoverBackgroundBackground color of close button in an QTabBar.
Default(light)
#00000020
Default(dark)
#ffffff25
Textarea#
Colors for QTextEdit, QTextBrowser and QPlainTextEdit.
textarea.inactiveSelectionBackgroundQTextEdit, QTextBrowser and QPlainTextEdit background color for the selected item when the widget is inactive.
Default(light)
#00000015
Default(dark)
#ffffff20
background>textareaQTextEdit/QPlainTextEdit background color.
Inherits
backgroundDefault(light)
#ffffff
Default(dark)
#1c1d1f
primary>textarea.selectionBackgroundBackground color of text selections in the QTextEdit, QTextBrowser and QPlainTextEdit.
Inherits
primaryDefault(light)
#619eef7f
Default(dark)
#5f9af466
Title#
Colors for title components.
background>titleBackground color for QDockWidget title and QToolBox tab.
Inherits
backgroundDefault(light)
#eceff2
Default(dark)
#161719
Toolbar#
Colors for QToolBar.
toolbar.activeBackgroundQToolBar button background color when clicking.
Default(light)
#00000024
Default(dark)
#ffffff34
toolbar.backgroundQToolBar background color.
Default(light)
#ebebeb
Default(dark)
#333333
toolbar.hoverBackgroundQToolbar background when hovering over items using the mouse.
Default(light)
#00000015
Default(dark)
#ffffff22