Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
3218cdf
Fix some formating issues in documentation. Remove unused import in `…
conradolandia Jul 7, 2025
6fb49e5
Update documentation to reflect API changes
conradolandia Jul 15, 2025
8d3bdff
Correct most recent QDarkStyle version accepted to work with Python 2
conradolandia Jul 16, 2025
87a9220
Fix errors in the documentation for custom palettes
conradolandia Jul 16, 2025
91c5dbc
Correct some functionality examples
conradolandia Jul 16, 2025
cb7ddd8
Apply suggestions from code review
conradolandia Jul 16, 2025
b055c23
Rewrite custom palettes documentation and improve examples after firs…
conradolandia Jul 17, 2025
0fc8fe2
Add missing element to dictionary in `Palette.to_dict()` method
conradolandia Jul 17, 2025
7097404
Add some minor corrections
conradolandia Jul 18, 2025
6272bcc
Add some caveats about inheriting from DarkPalette and LightPalette
conradolandia Jul 18, 2025
e1b7e71
Apply suggestions from code review
conradolandia Jul 18, 2025
2372919
Fix some formatting issues, improve README.rst and improve requiremen…
conradolandia Jul 18, 2025
368d269
Improved palette generation documentation regarding DarkPalette and L…
conradolandia Jul 18, 2025
ec490ba
Solve some documentation issues regarding palette IDs
conradolandia Jul 19, 2025
bc082ea
Improve usage example in documentation
conradolandia Jul 19, 2025
f11801f
Add demo for custom theme creation and update CONTRIBUTING.rst
conradolandia Jul 19, 2025
c08397a
Add more documentation about the custom themes demo
conradolandia Jul 19, 2025
9b3df00
Update qdarkstyle/__init__.py
conradolandia Jul 24, 2025
98173aa
Fix some formating issues in documentation. Remove unused import in `…
conradolandia Jul 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ Changelog
- Fix tabs style - selected tab color and shift #59, #72
- Restructure README creating AUTHORS, CHANGES, and LICENSE #71
- 2.3.1:
- Improve checkbox color (use accent color used in other widgets) and
darken view hover/selected colors to play nicer with other widget colors
- Improve checkbox color (use accent color used in other widgets) and darken view hover/selected colors to play nicer with other widget colors
- Shift to the right of the first tab
- Update license year
- Update README (fix snapshots links and formatting)
Expand Down Expand Up @@ -239,8 +238,7 @@ Changelog
- Remove outline on button, checkbox and radio button
- Add support for closable tabs
- Better disabled buttons
- Fix QTextEdit background color to match the color of QPlainTextEdit
and QLineEdit
- Fix QTextEdit background color to match the color of QPlainTextEdit and QLineEdit
- Better hover/selected states for QTreeView and QListView
- Add QHeaderView support
- 1.2:
Expand Down
9 changes: 3 additions & 6 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ Check `test <./test>`__ files to more details. Tests will keep our
application stable.

If You Are a Maintainer, Go Ahead to Production
----------------------------------------------
-----------------------------------------------

Of course, until you start these steps, make sure the package have
passed all tests and checkers before continuing. You must have accounts to
Expand Down Expand Up @@ -359,9 +359,7 @@ maintainer in both.

``twine check dist/*``

7. Try upload in `PyPI test
page <https://test.pypi.org/project/QDarkStyle>`__ platform before
the official
7. Try upload in `PyPI test page <https://test.pypi.org/project/QDarkStyle>`__ platform before the official

``twine upload --repository-url https://test.pypi.org/legacy/ dist/*``

Expand All @@ -373,8 +371,7 @@ maintainer in both.

``pip uninstall qdarkstyle -y``

10. Upload to `PyPI official
page <https://pypi.python.org/pypi/QDarkStyle>`__
10. Upload to `PyPI official page <https://pypi.python.org/pypi/QDarkStyle>`__

``twine upload --repository-url https://upload.pypi.org/legacy/ dist/*``

Expand Down
123 changes: 123 additions & 0 deletions docs/color_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,129 @@ B140 ``#F5FBFF`` |image31|
B150 ``#FFFFFF`` |image32|
=========== =========== =========

Palette System
--------------

QDarkStyle uses a palette system that defines semantic color constants for different UI elements and states. This system ensures consistency across themes and makes it easy to customize colors.

Background Colors
~~~~~~~~~~~~~~~~~

Background colors are used for different layers and depths in the interface:

=================== ======================= ======================= =========
Constant Dark Theme Light Theme Usage
=================== ======================= ======================= =========
COLOR_BACKGROUND_1 ``Gray.B10`` (#19232D) ``Gray.B140`` (#FAFAFA) Base background
COLOR_BACKGROUND_2 ``Gray.B20`` (#293544) ``Gray.B130`` (#DFE1E2) Secondary background
COLOR_BACKGROUND_3 ``Gray.B30`` (#37414F) ``Gray.B120`` (#D2D5D8) Tertiary background
COLOR_BACKGROUND_4 ``Gray.B40`` (#455364) ``Gray.B110`` (#C0C4C8) Raised elements
COLOR_BACKGROUND_5 ``Gray.B50`` (#54687A) ``Gray.B100`` (#B4B8BC) Pressed elements
COLOR_BACKGROUND_6 ``Gray.B60`` (#60798B) ``Gray.B90`` (#ACB1B6) Hover elements
=================== ======================= ======================= =========

Text Colors
~~~~~~~~~~~

Text colors for different content types and importance levels:

=================== ======================= ======================= =========
Constant Dark Theme Light Theme Usage
=================== ======================= ======================= =========
COLOR_TEXT_1 ``Gray.B130`` (#DFE1E2) ``Gray.B10`` (#19232D) Primary text
COLOR_TEXT_2 ``Gray.B110`` (#C0C4C8) ``Gray.B20`` (#293544) Secondary text
COLOR_TEXT_3 ``Gray.B90`` (#ACB1B6) ``Gray.B50`` (#54687A) Tertiary text
COLOR_TEXT_4 ``Gray.B80`` (#9DA9B5) ``Gray.B70`` (#788D9C) Quaternary text
=================== ======================= ======================= =========

Accent Colors
~~~~~~~~~~~~~

Accent colors for interactive elements, selections, and highlights:

=================== ======================= ======================= =========
Constant Dark Theme Light Theme Usage
=================== ======================= ======================= =========
COLOR_ACCENT_1 ``Blue.B20`` (#26486B) ``Blue.B130`` (#DAEDFF) Selection background
COLOR_ACCENT_2 ``Blue.B40`` (#346792) ``Blue.B100`` (#9FCBFF) Primary selection
COLOR_ACCENT_3 ``Blue.B50`` (#1A72BB) ``Blue.B90`` (#73C7FF) Hover selection
COLOR_ACCENT_4 ``Blue.B70`` (#259AE9) ``Blue.B80`` (#37AEFE) Active elements
COLOR_ACCENT_5 ``Blue.B80`` (#37AEFE) ``Blue.B70`` (#259AE9) Focus indicators
=================== ======================= ======================= =========

Special Colors
~~~~~~~~~~~~~~

Special-purpose colors for specific UI states:

=================== ======================= ======================= =========
Constant Dark Theme Light Theme Usage
=================== ======================= ======================= =========
COLOR_DISABLED ``Gray.B70`` (#788D9C) ``Gray.B80`` (#9DA9B5) Disabled elements
=================== ======================= ======================= =========

Other Palette Properties
~~~~~~~~~~~~~~~~~~~~~~~~

Additional properties that define the visual appearance:

=================== ======================= ======================= =========
Constant Value Value Usage
=================== ======================= ======================= =========
OPACITY_TOOLTIP 230 230 Tooltip opacity
SIZE_BORDER_RADIUS 4px 4px Border radius
=================== ======================= ======================= =========

Usage Examples
~~~~~~~~~~~~~~

**In custom palettes:**

.. code-block:: python

from qdarkstyle.palette import Palette
from qdarkstyle.colorsystem import Gray, Blue

class MyPalette(Palette):
ID = 'my_theme'

# Background colors
COLOR_BACKGROUND_1 = Gray.B15
COLOR_BACKGROUND_2 = Gray.B25

# Text colors
COLOR_TEXT_1 = Gray.B130
COLOR_TEXT_2 = Gray.B110

# Accent colors
COLOR_ACCENT_1 = Blue.B30
COLOR_ACCENT_2 = Blue.B50

# Special colors
COLOR_DISABLED = Gray.B75

**In SCSS/CSS:**

.. code-block:: text

QWidget {
background-color: $COLOR_BACKGROUND_1;
color: $COLOR_TEXT_1;
}

QPushButton {
background-color: $COLOR_BACKGROUND_4;
color: $COLOR_TEXT_1;
}

QPushButton:hover {
background-color: $COLOR_BACKGROUND_6;
}

QPushButton:disabled {
color: $COLOR_DISABLED;
}

.. |image1| image:: images/color_samples/GrayB0.png
.. |image2| image:: images/color_samples/GrayB10.png
.. |image3| image:: images/color_samples/GrayB20.png
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down Expand Up @@ -177,4 +177,4 @@


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
intersphinx_mapping = {'python': ('https://docs.python.org/', None)}
Loading