From eadfec4bf398c3038b20c17fcccfcd289eb384cd Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Wed, 31 Jul 2024 10:20:12 -0400 Subject: [PATCH] Adjust text colors to enhance contrast --- doc/doxygen/cantera-doxygen.css | 38 +++++++++++++++++++++++++++++++-- doc/sphinx/_static/custom.css | 6 ++++++ 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/doc/doxygen/cantera-doxygen.css b/doc/doxygen/cantera-doxygen.css index 619769711b..02213d9083 100644 --- a/doc/doxygen/cantera-doxygen.css +++ b/doc/doxygen/cantera-doxygen.css @@ -1,12 +1,46 @@ -/* Colors to match pydata-sphinx-theme */ html { - --primary-color: rgb(10, 125, 145); + /* Colors to match pydata-sphinx-theme */ + --primary-color: rgb(4, 97, 113); --pst-color-text-muted: rgb(100, 100, 100); + + /* Increase contrast of text in footer */ + --page-secondary-foreground-color: rgb(81, 96, 112); + + /* Improve contrast in code snippets */ + --code-background: #fafafa; + --fragment-keyword: #a25999; + --fragment-keywordtype: #7a51aa; + --fragment-keywordflow: #a35822; + --fragment-comment: #666666; + --fragment-link: #4269ad; + --fragment-preprocessor: #2f7975; + --fragment-token: #387a4d; + + /* Improve contrast in admonitions */ + --todo-color-darker: #172d37; + --note-color-dark: #8e6100; } html.dark-mode { --primary-color: rgb(63, 177, 197); --pst-color-text-muted: rgb(164, 164, 164); + + /* Improve contrast in admonitions */ + --warning-color-dark: rgb(247, 66, 46); + + /* Improve contrast of light text in "inline", "virtual", ... badges */ + span.mlabel { + background-color: rgb(4, 97, 113); + } +} + +/* Don't try to gray out the placeholder search text */ +#MSearchField::placeholder { + color: var(--searchbar-foreground); +} + +#MSearchField { + color: var(--searchbar-foreground); } .directory td.entry a:focus { diff --git a/doc/sphinx/_static/custom.css b/doc/sphinx/_static/custom.css index d16aa5a2fe..1a1bef0dbe 100644 --- a/doc/sphinx/_static/custom.css +++ b/doc/sphinx/_static/custom.css @@ -2,6 +2,12 @@ html { --pst-icon-external-link: ""; } +html[data-theme=light] { + /* Improve contrast with foreground colors */ + --pst-color-surface: rgb(250, 250, 250); + --pst-color-primary: rgb(4, 97, 113); +} + p + div.math { /* Remove post-paragraph space ahead of equation to center vertically */ margin-top: -1.15em;