Theme Color =========== You can customize your theme color with the argument ``custom_colors`` of ``qdarktheme.setup_theme``, ``qdarktheme.load_stylesheet`` and ``qdarktheme.load_palette``. .. code-block:: python import qdarktheme qdarktheme.setup_theme(custom_colors={"primary": "#D0BCFF"}) To customize a specific theme only, use the following syntax: .. code-block:: python import qdarktheme qdarktheme.setup_theme( custom_colors={ "[dark]": { "primary": "#D0BCFF", } } ) Color formats ------------- +--------------------------------------+--------------------------------------+ | Format | Example | +======================================+======================================+ | Case-insensitive hex RGB or RGBA | - ``'#0f0f0f'`` | | string. | - ``'#0f0f0f80'`` | +--------------------------------------+--------------------------------------+ | Case-insensitive RGB or RGBA string | - ``'#abc'`` as ``'#aabbcc'`` | | equivalent hex shorthand of | - ``'#fb1'`` as ``'#ffbb11'`` | | duplicated characters. | - ``'#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. .. list-table:: :stub-columns: 1 * - 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. .. list-table:: :stub-columns: 1 * - Inherited by - ``input`` * - Default(light) - #dadce0 * - Default(dark) - #3f4042 - ``foreground`` Overall foreground color. This color is only used if not overridden by a widget. .. list-table:: :stub-columns: 1 * - 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. .. list-table:: :stub-columns: 1 * - Inherits - ``foreground`` * - Default(light) - #4d515766 * - Default(dark) - #e4e7eb66 - ``foreground>disabledSelectionBackground`` Overall background color for the selected item when widgets are disabled. .. list-table:: :stub-columns: 1 * - Inherits - ``foreground`` * - Default(light) - #4d51573f * - Default(dark) - #e4e7eb33 - ``foreground>icon`` The default color for icons. .. list-table:: :stub-columns: 1 * - 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. .. list-table:: :stub-columns: 1 * - Inherits - ``foreground`` * - Default(light) - #4d515799 * - Default(dark) - #e4e7eb99 - ``primary`` Accent color. .. list-table:: :stub-columns: 1 * - 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. .. list-table:: :stub-columns: 1 * - 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. .. list-table:: :stub-columns: 1 * - 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). .. list-table:: :stub-columns: 1 * - 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. .. list-table:: :stub-columns: 1 * - Inherits - ``primary`` * - Default(light) - #1770e319 * - Default(dark) - #669ff51c - ``primary>defaultButton.activeBackground`` QPushButton when the widget is active(pressed or checked). .. list-table:: :stub-columns: 1 * - Inherits - ``primary`` * - Default(light) - #619eef * - Default(dark) - #5f9af4 - ``primary>defaultButton.hoverBackground`` Background color for default QPushButton when hovering over buttons using the mouse. .. list-table:: :stub-columns: 1 * - 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. .. list-table:: :stub-columns: 1 * - Default(light) - #f8f9fa * - Default(dark) - #3f4042 - ``inputButton.hoverBackground`` Hover background color of button in QAbstractSpinBox. .. list-table:: :stub-columns: 1 * - Default(light) - #00000018 * - Default(dark) - #ffffff25 - ``border>input`` Border color for QAbstractSpinBox, QComboBox and QLineEdit. .. list-table:: :stub-columns: 1 * - Inherits - ``border`` * - Default(light) - #dadce0 * - Default(dark) - #3f4042 - ``foreground>input.placeholder`` QLineEdit and QComboBox(editable) foreground color for placeholder text. .. list-table:: :stub-columns: 1 * - Inherits - ``foreground`` * - Default(light) - #4d515799 * - Default(dark) - #e4e7eb99 Link colors ^^^^^^^^^^^ Colors for link. - ``linkVisited`` Foreground color for already visited hyperlinks. .. list-table:: :stub-columns: 1 * - 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. .. list-table:: :stub-columns: 1 * - Default(light) - #00000009 * - Default(dark) - #ffffff0c - ``list.hoverBackground`` QListView/QListWidget, QTreeView/QTreeWidget and QColumnView background color when hovering over items using the mouse. .. list-table:: :stub-columns: 1 * - Default(light) - #00000013 * - Default(dark) - #ffffff13 - ``tree.inactiveIndentGuidesStroke`` QTreeView stroke color for indent guides when QTreeView is inactive. .. list-table:: :stub-columns: 1 * - Default(light) - #00000030 * - Default(dark) - #ffffff35 - ``tree.indentGuidesStroke`` QTreeView stroke color for indent guides. .. list-table:: :stub-columns: 1 * - Default(light) - #00000050 * - Default(dark) - #ffffff60 - ``treeSectionHeader.background`` QTreeView section header background color. .. list-table:: :stub-columns: 1 * - Default(light) - #dadce0 * - Default(dark) - #3f4042 - ``background>list`` Background color for QListView/QListWidget, QTreeView/QTreeWidget and QColumnView. .. list-table:: :stub-columns: 1 * - 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. .. list-table:: :stub-columns: 1 * - 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. .. list-table:: :stub-columns: 1 * - Inherits - ``primary`` * - Default(light) - #4990ed59 * - Default(dark) - #4288f266 Menubar ^^^^^^^ Colors for QMenuBar. - ``menubar.selectionBackground`` Background color of the selected menu item in the QMenuBar. .. list-table:: :stub-columns: 1 * - Default(light) - #00000020 * - Default(dark) - #ffffff25 Panel ^^^^^ Colors for panel. - ``background>panel`` Background color of QFrame when the frameShape property is Panel. .. list-table:: :stub-columns: 1 * - Inherits - ``background`` * - Default(light) - #ffffff * - Default(dark) - #161719 Popup ^^^^^ Colors for QMenu and QToolTip. - ``popupItem.checkbox.background`` Background color of QCheckBox in QMenu. .. list-table:: :stub-columns: 1 * - Default(light) - #00000019 * - Default(dark) - #ffffff19 - ``popupItem.selectionBackground`` Background color of the selected item in the QMenu. .. list-table:: :stub-columns: 1 * - Default(light) - #00000022 * - Default(dark) - #ffffff22 - ``background>popup`` Background color for QToolTip, QMenu and dropdown of QComboBox. .. list-table:: :stub-columns: 1 * - Inherits - ``background`` * - Default(light) - #ffffff * - Default(dark) - #2a2b2f Progress bar ^^^^^^^^^^^^ Colors for QProgressBar. - ``foreground>progressBar.disabledBackground`` Active indicator color of QProgressBar when disabled. .. list-table:: :stub-columns: 1 * - Inherits - ``foreground`` * - Default(light) - #4d51573f * - Default(dark) - #e4e7eb33 - ``primary>progressBar.background`` Active indicator color of QProgressBar. .. list-table:: :stub-columns: 1 * - Inherits - ``primary`` * - Default(light) - #4990ed * - Default(dark) - #669ff5 Scrollbar control ^^^^^^^^^^^^^^^^^ Colors for QScrollBar. - ``scrollbar.background`` QScrollBar background color. Available on OS other than mac. .. list-table:: :stub-columns: 1 * - Default(light) - #00000010 * - Default(dark) - #ffffff10 - ``scrollbarSlider.activeBackground`` QScrollbar slider background color when clicked on. .. list-table:: :stub-columns: 1 * - Default(light) - #00000060 * - Default(dark) - #ffffff60 - ``scrollbarSlider.background`` QScrollbar slider background color. .. list-table:: :stub-columns: 1 * - Default(light) - #00000040 * - Default(dark) - #ffffff30 - ``scrollbarSlider.disabledBackground`` Scrollbar slider background color when disabled. .. list-table:: :stub-columns: 1 * - Default(light) - #00000015 * - Default(dark) - #ffffff15 - ``scrollbarSlider.hoverBackground`` QScrollbar slider background color when hovering. .. list-table:: :stub-columns: 1 * - Default(light) - #00000050 * - Default(dark) - #ffffff45 Slider control ^^^^^^^^^^^^^^ Colors for QSlider. - ``foreground>slider.disabledBackground`` Active track and handle color of QSlider when disabled. .. list-table:: :stub-columns: 1 * - Inherits - ``foreground`` * - Default(light) - #4d51573f * - Default(dark) - #e4e7eb33 - ``foreground>sliderTrack.inactiveBackground`` Inactive track color of QSlider. .. list-table:: :stub-columns: 1 * - Inherits - ``foreground`` * - Default(light) - #4d515733 * - Default(dark) - #e4e7eb19 - ``primary>sliderHandle.activeBackground`` QSlider handle color when pressing or hovering over the handle using the mouse. .. list-table:: :stub-columns: 1 * - Inherits - ``primary`` * - Default(light) - #4990ed * - Default(dark) - #6aa1f5 Statusbar colors ^^^^^^^^^^^^^^^^ Colors for QStatusBar. - ``statusBar.background`` QStatusBar background color. .. list-table:: :stub-columns: 1 * - Default(light) - #dfe1e5 * - Default(dark) - #2a2b2e - ``statusBarItem.activeBackground`` QStatusBar item background color when clicking. .. list-table:: :stub-columns: 1 * - Default(light) - #00000024 * - Default(dark) - #ffffff34 - ``statusBarItem.hoverBackground`` QStatusBar item background color when hovering. .. list-table:: :stub-columns: 1 * - Default(light) - #00000015 * - Default(dark) - #ffffff22 Table ^^^^^ Colors for QTableView/QTableWidget. - ``table.alternateBackground`` Background color for QTableView/QTableWidget alternating rows. .. list-table:: :stub-columns: 1 * - Default(light) - #00000012 * - Default(dark) - #ffffff15 - ``tableSectionHeader.background`` QTableView/QTableWidget section header background color. .. list-table:: :stub-columns: 1 * - Default(light) - #dadce0 * - Default(dark) - #3f4042 - ``background>table`` QTableView/QTableWidget background color. .. list-table:: :stub-columns: 1 * - Inherits - ``background`` * - Default(light) - #ffffff * - Default(dark) - #101012 - ``primary>table.selectionBackground`` QTableView/QTableWidget background color when selected item. .. list-table:: :stub-columns: 1 * - Inherits - ``primary`` * - Default(light) - #3282ea7f * - Default(dark) - #4288f28c - ``primary>table.inactiveSelectionBackground`` QTableView/QTableWidget background color for the selected item when the widget is inactive. .. list-table:: :stub-columns: 1 * - Inherits - ``primary`` * - Default(light) - #0d418516 * - Default(dark) - #d2e3fc2d Tabs ^^^^ Colors for QTabBar. - ``tab.activeBackground`` Active Tab background color in an QTabBar. .. list-table:: :stub-columns: 1 * - Default(light) - #00000000 * - Default(dark) - #ffffff00 - ``tab.hoverBackground`` Tab background color when hovering in an QTabBar. .. list-table:: :stub-columns: 1 * - Default(light) - #00000015 * - Default(dark) - #ffffff18 - ``tabCloseButton.hoverBackground`` Background color of close button in an QTabBar. .. list-table:: :stub-columns: 1 * - 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. .. list-table:: :stub-columns: 1 * - Default(light) - #00000015 * - Default(dark) - #ffffff20 - ``background>textarea`` QTextEdit/QPlainTextEdit background color. .. list-table:: :stub-columns: 1 * - Inherits - ``background`` * - Default(light) - #ffffff * - Default(dark) - #1c1d1f - ``primary>textarea.selectionBackground`` Background color of text selections in the QTextEdit, QTextBrowser and QPlainTextEdit. .. list-table:: :stub-columns: 1 * - Inherits - ``primary`` * - Default(light) - #619eef7f * - Default(dark) - #5f9af466 Title ^^^^^ Colors for title components. - ``background>title`` Background color for QDockWidget title and QToolBox tab. .. list-table:: :stub-columns: 1 * - Inherits - ``background`` * - Default(light) - #eceff2 * - Default(dark) - #161719 Toolbar ^^^^^^^ Colors for QToolBar. - ``toolbar.activeBackground`` QToolBar button background color when clicking. .. list-table:: :stub-columns: 1 * - Default(light) - #00000024 * - Default(dark) - #ffffff34 - ``toolbar.background`` QToolBar background color. .. list-table:: :stub-columns: 1 * - Default(light) - #ebebeb * - Default(dark) - #333333 - ``toolbar.hoverBackground`` QToolbar background when hovering over items using the mouse. .. list-table:: :stub-columns: 1 * - Default(light) - #00000015 * - Default(dark) - #ffffff22