Repository: scipy/scipy

Issue:
DOC: Colors/design with PyData Sphinx Theme > 0.15
### Issue with current documentation:

The new versions of the PyData Sphinx Theme have renamed/refactores a few css classes, meaning that some of the colors in our documentation were overriden:

![Screenshot_20240124_151656](https://github.com/scipy/scipy/assets/3949932/5beb4613-edb6-4808-8c33-cb542ea0a41e)


### Idea or request for content:

Do we want to use some color from our usual palette? Note that the scipy.org website (which uses the [scientific python hugo theme](https://github.com/scientific-python/scientific-python-hugo-theme)) has incorporated some of the purple/violet (?) highlights:

![Screenshot_20240124_151948](https://github.com/scipy/scipy/assets/3949932/45cbe4ed-3071-43de-bf45-88ca1a28ad4d)


### Additional context (e.g. screenshots, GIFs)

Purely cosmetic question but I thought I'd ask 😄 


Discussion:
The icons on the home page don't look great on dark mode:

<img width="883" alt="image" src="https://github.com/scipy/scipy/assets/51488791/0d4e5171-d941-4b5c-86a6-7ae8e19e3111">

I would personally not change anything as the colors are supposedly better from an accessibility point of view. Unless we would have a team to design an accessible (like NumPy did I believe), I would forward questions or else to the theme itself
@tupui that is a good point, although currently we have a mix of colors from the theme and some pre-defined by us, so we would need to check for contrast and accessibility anyway. For reference, I did a quick simulation with colors inspired by NumPy. 

First, the current NumPy palette: https://github.com/numpy/numpy.org#user-experience-ux

![Screenshot_20240125_211338](https://github.com/scipy/scipy/assets/3949932/b225cc15-5cca-4045-86ca-180449fd223d)

This is how it looks like on a page: (including the pink that is not on the official palette)

![Screenshot_20240125_210956](https://github.com/scipy/scipy/assets/3949932/abf03f3f-9f26-4691-9618-fa3db667bd52)

Note that for the homepage, however, we have a contrast problem for the footer:

![Screenshot_20240125_211930](https://github.com/scipy/scipy/assets/3949932/3d1898aa-ba1e-4a62-b04e-63341e3139bb)

Quick check gives me the following:

![Screenshot_20240125_213308](https://github.com/scipy/scipy/assets/3949932/b6a977f0-3b11-417a-8f78-064660c1ab29)


Note that the PyData Sphinx Theme color is chosen based on their own palette, not the NumPy "blue".

SciPy's current palette, including the new violet from the PyData Sphinx Theme:
![Screenshot_20240125_211731](https://github.com/scipy/scipy/assets/3949932/a92c569b-3597-4626-81fa-7e6b7ecad932)

For good measure, I tested with the NumPy "yellow" just to see how that looks like:
![Screenshot_20240125_212045](https://github.com/scipy/scipy/assets/3949932/125ab280-8d5c-435a-a902-098612f9d113)

I am of course not a designer 😄 but I'd be happy to check for contrast on all those at a minimum.

To clarify, I would either go with no color tweak on our side, i.e. removing all our customisation as we have been slowly doing since we introduced the theme. Or invest some resources to design our own identity. I would love to go with option 2 and we would even have some of our funds for that.
By the way, I am happy to see that the sidebar is actually fixed for the dev docs! Seems like we only have issues for PR previews which is totally ok to me then.

cc @drammock (also I don't want to create an issue for that, but I am seeing in small screens that we have for the version button `margin-bottom: 1em` and this should be 0)
> Note that the scipy.org website (which uses the [scientific python hugo theme](https://github.com/scientific-python/scientific-python-hugo-theme)) has incorporated some of the purple/violet (?) highlights

Indeed, we've been working to unify several elements of the scientific python hugo theme and the pydata-sphinx-theme. See https://github.com/scientific-python/scientific-python-hugo-theme/issues/302

> To clarify, I would either go with no color tweak on our side, i.e. removing all our customisation as we have been slowly doing since we introduced the theme. Or invest some resources to design our own identity. I would love to go with option 2 and we would even have some of our funds for that.

+1.  The color system was pretty carefully crafted with usability and accessibility in mind; overriding just one or two colors risks doing more harm than good. That said, I'm happy to have some conversations if there are just a few specific colors / aspects of the theme that are particularly troublesome for SciPy; we might be able to find a solution that avoids a full identity redesign.
Sounds good! I can give it a go removing the scipy customizations and if everyone's happy with it, it's one less thing we need to maintain 😄 
The version switcher could do with being vertically centred (on mobile Safari at least).

![image](https://github.com/scipy/scipy/assets/51488791/93fac2cf-c5f7-49a4-a45a-6eb652669fc0)
Hey folks


I am of course biased but I'd suggest removing non essential customisations to benefit from all the recent accessibility improvements in PST. 

In addition, we could work towards some adjustments to the NumPy colours to keep some of the visual identity without hindering accessibility or usability. (For example, it will be unlikely we can keep the bright yellow for light/dark theme conformance but could find an alternative). 
Without needing a full identity overhaul like @drammock already mentioned. 

Resolving patch:
diff --git a/doc/source/conf.py b/doc/source/conf.py
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -206,26 +206,30 @@
 }
 
 html_theme_options = {
-  "github_url": "https://github.com/scipy/scipy",
-  "twitter_url": "https://twitter.com/SciPy_team",
-  "header_links_before_dropdown": 6,
-  "icon_links": [],
-  "navbar_start": ["navbar-logo", "version-switcher"],
-  "navbar_persistent": [],
-  "switcher": {
-      "json_url": "https://scipy.github.io/devdocs/_static/version_switcher.json",
-      "version_match": version,
-  },
-  "show_version_warning_banner": True,
-  "secondary_sidebar_items": ["page-toc"],
-  # The service https://plausible.io is used to gather simple
-  # and privacy-friendly analytics for the site. The dashboard can be accessed
-  # at https://analytics.scientific-python.org/docs.scipy.org
-  # The Scientific-Python community is hosting and managing the account.
-  "analytics": {
-      "plausible_analytics_domain": "docs.scipy.org",
-      "plausible_analytics_url": "https://views.scientific-python.org/js/script.js",
-  }
+    "github_url": "https://github.com/scipy/scipy",
+    "twitter_url": "https://twitter.com/SciPy_team",
+    "header_links_before_dropdown": 6,
+    "icon_links": [],
+    "logo": {
+        "text": "SciPy",
+    },
+    "navbar_start": ["navbar-logo"],
+    "navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
+    "navbar_persistent": [],
+    "switcher": {
+        "json_url": "https://scipy.github.io/devdocs/_static/version_switcher.json",
+        "version_match": version,
+    },
+    "show_version_warning_banner": True,
+    "secondary_sidebar_items": ["page-toc"],
+    # The service https://plausible.io is used to gather simple
+    # and privacy-friendly analytics for the site. The dashboard can be accessed
+    # at https://analytics.scientific-python.org/docs.scipy.org
+    # The Scientific-Python community is hosting and managing the account.
+    "analytics": {
+        "plausible_analytics_domain": "docs.scipy.org",
+        "plausible_analytics_url": "https://views.scientific-python.org/js/script.js",
+    },
 }
 
 if 'dev' in version:


Test patch: