Theme Color#
You can customize your theme color with the argument custom_colors of qdarktheme.load_stylesheet and qdarktheme.load_palette.
import qdarktheme
qdarktheme.load_stylesheet(custom_colors={"primary": "#D0BCFF"})
# or
qdarktheme.load_palette(custom_colors={"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
panelpopuptabletextareatitleDefault(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.hoverBackgrounditemView.selectionBackgroundprogressBar.backgroundselection.backgroundsliderHandle.activeBackgroundtextarea.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, 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
Item view#
Colors for QColumnView, QHeaderView, QListView, QTableView, and QTreeView.
itemView.alternateBackgroundBackground color for QAbstractItemView, QColumnView, QHeaderView, QListView, QTableView, and QTreeView alternating rows.
Default(light)
#00000009
Default(dark)
#ffffff09
itemView.hoverBackgroundQAbstractItemView, QColumnView, QHeaderView, QListView, QTableView, and QTreeView background color when hovering over items using the mouse.
Default(light)
#00000018
Default(dark)
#ffffff18
itemView.inactiveSelectionBackgroundQAbstractItemView, QColumnView, QHeaderView, QListView, QTableView, and QTreeView background color for the selected item when the widget is inactive.
Default(light)
#00000015
Default(dark)
#ffffff15
itemViewSectionHeader.backgroundQHeaderView background color.
Default(light)
#dadce0
Default(dark)
#3f4042
primary>itemView.selectionBackgroundBackground color for QAbstractItemView, QColumnView, QHeaderView, QListView, QTableView, and QTreeView when selected item or texts.
Inherits
primaryDefault(light)
#4990ed59
Default(dark)
#4288f25e
Link colors#
Colors for link.
linkVisitedForeground color for already visited hyperlinks.
Default(light)
#660098
Default(dark)
#c58af8
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.
background>tableQTableView/QTableWidget background color.
Inherits
backgroundDefault(light)
#ffffff
Default(dark)
#101012
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
Tree#
Colors for QTreeView.
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