Skip to content

Commit

Permalink
Renamed bright, high-contrast, and muted color palettes and add others (
Browse files Browse the repository at this point in the history
#122)

* Renamed color palettes taken from Paul Tol's website

* Update pylint config

* Added more color-schemes from Paul Tol's website

* Include new color-palette in tutorial notebook

* Fix the html docs
  • Loading branch information
pnkraemer authored Oct 28, 2023
1 parent c2961e4 commit bfca90a
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 61 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
# a list of builtin themes.
#
html_theme = "sphinx_book_theme"
html_theme_options = {}
html_theme_options = {"navigation_with_keys": False}

# (Optional) Logo. Should be small enough to fit the navbar (ideally 24x24).
# Path should be relative to the ``_static`` files directory.
Expand Down
104 changes: 59 additions & 45 deletions docs/source/example_notebooks/color-cycles.ipynb

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,11 @@ load-plugins = [

[tool.pylint.messages_control]
disable = [
# Exceptions suggested by Black:
# https://github.com/psf/black/blob/7f75fe3669ebf0627b1b0476a6d02047e909b959/docs/compatible_configs.md#black-compatible-configurations
"bad-continuation",
"bad-whitespace",
# Specific ignores
"invalid-name", # we name things the way we want.
"line-too-long", # black takes care of linebreaks itself. Long docs dont really matter.
"import-error", # caught by the tests, not by pylint.
"too-many-arguments", # e.g. figsize-configs tend to have many arguments, which is acceptable.
]

[tool.pylint.format]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,25 @@ def case_palettes_pn():
return palettes.pn


def case_palettes_bright():
return palettes.bright
def case_palettes_paultol_bright():
return palettes.paultol_bright


def case_palettes_muted():
return palettes.muted
def case_palettes_paultol_muted():
return palettes.paultol_muted


def case_palettes_paultol_high_contrast():
return palettes.paultol_high_contrast


def case_palettes_paultol_medium_contrast():
return palettes.paultol_medium_contrast


def case_palettes_paultol_vibrant():
return palettes.paultol_vibrant


def case_palettes_paultol_light():
return palettes.paultol_light
66 changes: 59 additions & 7 deletions tueplots/constants/color/palettes.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@
rgb.pn_red,
]
)
"""Colors of ProbNum: probnum.org."""
"""Colors used for probnum.org."""

bright = np.array(
paultol_bright = np.array(
[
"4477AA",
"EE6677",
Expand All @@ -88,16 +88,16 @@
)
"""Bright colors.
From Paul Tot's website: https://personal.sron.nl/~pault/.
From Paul Tol's website: https://personal.sron.nl/~pault/.
"""

high_contrast = np.array(["004488", "DDAA33", "BB5566"])
paultol_high_contrast = np.array(["004488", "DDAA33", "BB5566"])
"""High-contrast colors.
From Paul Tot's website: https://personal.sron.nl/~pault/.
From Paul Tol's website: https://personal.sron.nl/~pault/.
"""

muted = np.array(
paultol_muted = np.array(
[
"CC6677",
"332288",
Expand All @@ -113,5 +113,57 @@
)
"""Muted colors.
From Paul Tot's website: https://personal.sron.nl/~pault/.
From Paul Tol's website: https://personal.sron.nl/~pault/.
"""


paultol_medium_contrast = np.array(
[
"EECC66",
"EE99AA",
"6699CC",
"997700",
"994455",
"004488",
]
)
"""Medium-contrast colors.
From Paul Tol's website: https://personal.sron.nl/~pault/.
"""


paultol_vibrant = np.array(
[
"0077BB",
"33BBEE",
"009988",
"EE7733",
"CC3311",
"EE3377",
"BBBBBB",
]
)
"""Vibrant colors.
From Paul Tol's website: https://personal.sron.nl/~pault/.
"""


paultol_light = np.array(
[
"77AADD",
"99DDFF",
"44BB99",
"BBCC33",
"AAAA00",
"EEDD88",
"EE8866",
"FFAABB",
"DDDDDD",
]
)
"""Light colors.
From Paul Tol's website: https://personal.sron.nl/~pault/.
"""

0 comments on commit bfca90a

Please sign in to comment.