Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dark mode style color for contrast in docs #429

Merged
merged 2 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading