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.

  • '#0f0f0f'

  • '#0f0f0f80'

Case-insensitive RGB or RGBA string equivalent hex shorthand of duplicated characters.

  • '#abc' as '#aabbcc'

  • '#fb1' as '#ffbb11'

  • '#e35f' as '#ee3355ff'

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

Button control#

Colors for QPushButton, QToolButton and QDockWidget title button.

  • foreground>defaultButton.disabledBackground

    Default QPushButton background color when disabled.

    Inherits

    foreground

    Default(light)

    #4d51573f

    Default(dark)

    #e4e7eb33

  • primary>button.activeBackground

    Background color for QPushButton, QToolButton and button on QDockWidget title when the widget is active(pressed or checked).

    Inherits

    primary

    Default(light)

    #1770e33d

    Default(dark)

    #5796f43a

  • primary>button.hoverBackground

    Background color for QPushButton, QToolButton and button on QDockWidget title when hovering over buttons using the mouse.

    Inherits

    primary

    Default(light)

    #1770e319

    Default(dark)

    #669ff51c

  • primary>defaultButton.activeBackground

    QPushButton when the widget is active(pressed or checked).

    Inherits

    primary

    Default(light)

    #619eef

    Default(dark)

    #5f9af4

  • primary>defaultButton.hoverBackground

    Background color for default QPushButton when hovering over buttons using the mouse.

    Inherits

    primary

    Default(light)

    #3282ea

    Default(dark)

    #75a8f6

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

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

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