Skip to content

Commit

Permalink
Add dark mode style color for contrast in docs (#429)
Browse files Browse the repository at this point in the history
* add distinct dark mode style color for docs

* set virtualenv for readthedocs builds
  • Loading branch information
d33bs authored Sep 12, 2024
1 parent 409d2aa commit 37cf141
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
5 changes: 3 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ build:
- poetry config virtualenvs.create false
post_install:
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
- poetry install --with dev,docs --all-extras
# (https://python-poetry.org/docs/managing-dependencies/#dependency-groups)
# and leverage READTHEDOCS_VIRTUALENV_PATH for environment.
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with dev,docs --all-extras

sphinx:
builder: html
Expand Down
26 changes: 14 additions & 12 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,26 +55,28 @@


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
pycytominer_hex = "#88239A"
# The theme to use for HTML and HTML Help pages.
# Furo theme options specified here: https://pradyunsg.me/furo/
html_theme = "furo"

# colors used for styling the HTML output in light or dark mode
pycytominer_hex_light = "#88239A"
pycytominer_hex_dark = "#CF72DF"

# Furo theme option colors specified here:
# https://github.com/pradyunsg/furo/blob/main/src/furo/assets/styles/variables/_colors.scss
html_theme_options = {
"light_css_variables": {
"color-brand-primary": pycytominer_hex,
"color-brand-content": pycytominer_hex,
"color-api-pre-name": pycytominer_hex,
"color-api-name": pycytominer_hex,
"color-brand-primary": pycytominer_hex_light,
"color-brand-content": pycytominer_hex_light,
"color-api-pre-name": pycytominer_hex_light,
"color-api-name": pycytominer_hex_light,
},
"dark_css_variables": {
"color-brand-primary": pycytominer_hex,
"color-brand-content": pycytominer_hex,
"color-api-pre-name": pycytominer_hex,
"color-api-name": pycytominer_hex,
"color-brand-primary": pycytominer_hex_dark,
"color-brand-content": pycytominer_hex_dark,
"color-api-pre-name": pycytominer_hex_dark,
"color-api-name": pycytominer_hex_dark,
},
}

Expand Down

0 comments on commit 37cf141

Please sign in to comment.