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.
background
Overall background color. This color is only used if not overridden by a widget.
Inherited by
list
panel
popup
table
textarea
title
Default(light)
#f8f9fa
Default(dark)
#202124
border
Overall border color. This color is only used if not overridden by a widget.
Inherited by
input
Default(light)
#dadce0
Default(dark)
#3f4042
foreground
Overall foreground color. This color is only used if not overridden by a widget.
Inherited by
defaultButton.disabledBackground
disabled
disabledSelectionBackground
icon
icon.unfocused
input.placeholder
progressBar.disabledBackground
slider.disabledBackground
sliderTrack.inactiveBackground
Default(light)
#4d5157
Default(dark)
#e4e7eb
foreground>disabled
Overall foreground color for disabled elements. This color is only used if not overridden by a widget.
Inherits
foreground
Default(light)
#4d515766
Default(dark)
#e4e7eb66
foreground>disabledSelectionBackground
Overall background color for the selected item when widgets are disabled.
Inherits
foreground
Default(light)
#4d51573f
Default(dark)
#e4e7eb33
foreground>icon
The default color for icons.
Inherits
foreground
Default(light)
#494d53
Default(dark)
#e1e5e9
foreground>icon.unfocused
The default color for icons when unfocused. Currently, this color is only used for unselected tab close button of QTabBar.
Inherits
foreground
Default(light)
#4d515799
Default(dark)
#e4e7eb99
primary
Accent color.
Inherited by
button.activeBackground
button.hoverBackground
defaultButton.activeBackground
defaultButton.hoverBackground
list.inactiveSelectionBackground
list.selectionBackground
progressBar.background
selection.background
sliderHandle.activeBackground
table.selectionBackground
table.inactiveSelectionBackground
textarea.selectionBackground
Default(light)
#1a73e8
Default(dark)
#8ab4f7
primary>selection.background
Overall background color when selected item or texts. This color is only used if not overridden by a widget.
Inherits
primary
Default(light)
#619eef7f
Default(dark)
#5f9af466
Input#
Colors for QAbstractSpinBox, QSpinBox, QComboBox and QLineEdit.
input.background
Background color for QAbstractSpinBox, QComboBox and QLineEdit.
Default(light)
#f8f9fa
Default(dark)
#3f4042
inputButton.hoverBackground
Hover background color of button in QAbstractSpinBox.
Default(light)
#00000018
Default(dark)
#ffffff25
border>input
Border color for QAbstractSpinBox, QComboBox and QLineEdit.
Inherits
border
Default(light)
#dadce0
Default(dark)
#3f4042
foreground>input.placeholder
QLineEdit and QComboBox(editable) foreground color for placeholder text.
Inherits
foreground
Default(light)
#4d515799
Default(dark)
#e4e7eb99
Link colors#
Colors for link.
linkVisited
Foreground color for already visited hyperlinks.
Default(light)
#660098
Default(dark)
#c58af8
Lists and trees#
Colors for QListView/QListWidget and QTreeView/QTreeWidget and QColumnView.
list.alternateBackground
Background color for QListView/QListWidget, QTreeView/QTreeWidget and QColumnView alternating rows.
Default(light)
#00000009
Default(dark)
#ffffff0c
list.hoverBackground
QListView/QListWidget, QTreeView/QTreeWidget and QColumnView background color when hovering over items using the mouse.
Default(light)
#00000013
Default(dark)
#ffffff13
tree.inactiveIndentGuidesStroke
QTreeView stroke color for indent guides when QTreeView is inactive.
Default(light)
#00000030
Default(dark)
#ffffff35
tree.indentGuidesStroke
QTreeView stroke color for indent guides.
Default(light)
#00000050
Default(dark)
#ffffff60
treeSectionHeader.background
QTreeView section header background color.
Default(light)
#dadce0
Default(dark)
#3f4042
background>list
Background color for QListView/QListWidget, QTreeView/QTreeWidget and QColumnView.
Inherits
background
Default(light)
#f8f9fa
Default(dark)
#202124
primary>list.inactiveSelectionBackground
QListView/QListWidget, QTreeView/QTreeWidget and QColumnView background color for the selected item when the widget is inactive.
Inherits
primary
Default(light)
#0d418516
Default(dark)
#d2e3fc26
primary>list.selectionBackground
Background color for QListView/QListWidget, QTreeView/QTreeWidget and QColumnView when selected item or texts.
Inherits
primary
Default(light)
#4990ed59
Default(dark)
#4288f266
Panel#
Colors for panel.
background>panel
Background color of QFrame when the frameShape property is Panel.
Inherits
background
Default(light)
#ffffff
Default(dark)
#161719
Popup#
Colors for QMenu and QToolTip.
popupItem.checkbox.background
Background color of QCheckBox in QMenu.
Default(light)
#00000019
Default(dark)
#ffffff19
popupItem.selectionBackground
Background color of the selected item in the QMenu.
Default(light)
#00000022
Default(dark)
#ffffff22
background>popup
Background color for QToolTip, QMenu and dropdown of QComboBox.
Inherits
background
Default(light)
#ffffff
Default(dark)
#2a2b2f
Progress bar#
Colors for QProgressBar.
foreground>progressBar.disabledBackground
Active indicator color of QProgressBar when disabled.
Inherits
foreground
Default(light)
#4d51573f
Default(dark)
#e4e7eb33
primary>progressBar.background
Active indicator color of QProgressBar.
Inherits
primary
Default(light)
#4990ed
Default(dark)
#669ff5
Scrollbar control#
Colors for QScrollBar.
scrollbar.background
QScrollBar background color. Available on OS other than mac.
Default(light)
#00000010
Default(dark)
#ffffff10
scrollbarSlider.activeBackground
QScrollbar slider background color when clicked on.
Default(light)
#00000060
Default(dark)
#ffffff60
scrollbarSlider.background
QScrollbar slider background color.
Default(light)
#00000040
Default(dark)
#ffffff30
scrollbarSlider.disabledBackground
Scrollbar slider background color when disabled.
Default(light)
#00000015
Default(dark)
#ffffff15
scrollbarSlider.hoverBackground
QScrollbar slider background color when hovering.
Default(light)
#00000050
Default(dark)
#ffffff45
Slider control#
Colors for QSlider.
foreground>slider.disabledBackground
Active track and handle color of QSlider when disabled.
Inherits
foreground
Default(light)
#4d51573f
Default(dark)
#e4e7eb33
foreground>sliderTrack.inactiveBackground
Inactive track color of QSlider.
Inherits
foreground
Default(light)
#4d515733
Default(dark)
#e4e7eb19
primary>sliderHandle.activeBackground
QSlider handle color when pressing or hovering over the handle using the mouse.
Inherits
primary
Default(light)
#4990ed
Default(dark)
#6aa1f5
Statusbar colors#
Colors for QStatusBar.
statusBar.background
QStatusBar background color.
Default(light)
#dfe1e5
Default(dark)
#2a2b2e
statusBarItem.activeBackground
QStatusBar item background color when clicking.
Default(light)
#00000024
Default(dark)
#ffffff34
statusBarItem.hoverBackground
QStatusBar item background color when hovering.
Default(light)
#00000015
Default(dark)
#ffffff22
Table#
Colors for QTableView/QTableWidget.
table.alternateBackground
Background color for QTableView/QTableWidget alternating rows.
Default(light)
#00000012
Default(dark)
#ffffff15
tableSectionHeader.background
QTableView/QTableWidget section header background color.
Default(light)
#dadce0
Default(dark)
#3f4042
background>table
QTableView/QTableWidget background color.
Inherits
background
Default(light)
#ffffff
Default(dark)
#101012
primary>table.selectionBackground
QTableView/QTableWidget background color when selected item.
Inherits
primary
Default(light)
#3282ea7f
Default(dark)
#4288f28c
primary>table.inactiveSelectionBackground
QTableView/QTableWidget background color for the selected item when the widget is inactive.
Inherits
primary
Default(light)
#0d418516
Default(dark)
#d2e3fc2d
Tabs#
Colors for QTabBar.
tab.activeBackground
Active Tab background color in an QTabBar.
Default(light)
#00000000
Default(dark)
#ffffff00
tab.hoverBackground
Tab background color when hovering in an QTabBar.
Default(light)
#00000015
Default(dark)
#ffffff18
tabCloseButton.hoverBackground
Background color of close button in an QTabBar.
Default(light)
#00000020
Default(dark)
#ffffff25
Textarea#
Colors for QTextEdit, QTextBrowser and QPlainTextEdit.
textarea.inactiveSelectionBackground
QTextEdit, QTextBrowser and QPlainTextEdit background color for the selected item when the widget is inactive.
Default(light)
#00000015
Default(dark)
#ffffff20
background>textarea
QTextEdit/QPlainTextEdit background color.
Inherits
background
Default(light)
#ffffff
Default(dark)
#1c1d1f
primary>textarea.selectionBackground
Background color of text selections in the QTextEdit, QTextBrowser and QPlainTextEdit.
Inherits
primary
Default(light)
#619eef7f
Default(dark)
#5f9af466
Title#
Colors for title components.
background>title
Background color for QDockWidget title and QToolBox tab.
Inherits
background
Default(light)
#eceff2
Default(dark)
#161719
Toolbar#
Colors for QToolBar.
toolbar.activeBackground
QToolBar button background color when clicking.
Default(light)
#00000024
Default(dark)
#ffffff34
toolbar.background
QToolBar background color.
Default(light)
#ebebeb
Default(dark)
#333333
toolbar.hoverBackground
QToolbar background when hovering over items using the mouse.
Default(light)
#00000015
Default(dark)
#ffffff22