Metadata-Version: 2.5
Name: jupyterlab_redis_theme
Version: 0.1.0
Dynamic: Keywords
Summary: Redis-branded Light and Dark themes for JupyterLab
Project-URL: Homepage, https://github.com/nic-gibson/jupyterlab-redis-theme
Project-URL: Bug Tracker, https://github.com/nic-gibson/jupyterlab-redis-theme/issues
Project-URL: Repository, https://github.com/nic-gibson/jupyterlab-redis-theme.git
Author-email: Nic Gibson <nic.gibson@redis.com>
License: BSD 3-Clause License
        
        Copyright (c) 2026, Redis Ltd.
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE
Classifier: Framework :: Jupyter
Classifier: Framework :: Jupyter :: JupyterLab
Classifier: Framework :: Jupyter :: JupyterLab :: 4
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Themes
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# jupyterlab-redis-theme

Redis Light and Redis Dark themes for JupyterLab 4, built from the
`redis-brand-ui` guidelines (brand.redis.io).

## Install

From PyPI (no Node.js needed; the extension is prebuilt):

```bash
pip install jupyterlab-redis-theme
jupyter labextension list   # should show jupyterlab-redis-theme enabled
```

From a checkout (needs Python 3.9+, Node.js and JupyterLab 4):

```bash
pip install .
```

Then in JupyterLab: **Settings → Theme → Redis Light / Redis Dark**.

Development: `pip install -e . && jupyter labextension develop . --overwrite`,
then `jlpm watch`. Regenerate the CSS with `jlpm css` (needs `python` on PATH); the generated file is committed so normal builds do not need it.

## How it works

Each theme loads JupyterLab's built-in Light/Dark theme first (so every
`--jp-*` variable stays defined and tracks JupyterLab upgrades), then
`style/index.css`, which overrides colours, fonts and a few widgets. That file
is **generated** — edit `scripts/generate_css.py` and run `jlpm css`.
The generator also checks WCAG contrast for every text/background pair and
fails the build if one drops below AA.

## Design decisions

- **Hyper `#FF4438` is an accent, not a fill for text.** White on Hyper/Deep
  Hyper fails AA, so selected file rows and primary dialog buttons use
  navy/neutral fills with a Hyper edge, per the brand guide's button pattern.
  Hyper drives tab indicators, the cursor, focus rings and active cell borders.
- **No generated red scale.** Selections and tints are mixes of `#B9C2C6`.
- **Fonts:** Space Grotesk (UI) and Space Mono (code) are bundled as woff2 in
  `style/fonts/`, so the theme works offline and makes no Google Fonts requests.
  See [Third-party fonts](#third-party-fonts).
- **Logo:** not shipped (brand guide: never recreate it). Download the official
  `Redis_Mark_*_RGB.svg` from <https://brand.redis.io/document/18>, save as
  `style/redis-mark.svg`, and uncomment the logo block in the generator.
- **Deviations from the web brand guide:** the 44px target applies to dialog
  buttons only (JupyterLab toolbars are dense by design); spacing is JupyterLab's
  own grid, not 8px.

## Third-party fonts

The fonts in `style/fonts/` are not covered by this package's BSD-3-Clause
licence. Both are distributed under the SIL Open Font License 1.1:

- Space Grotesk, Copyright 2020 The Space Grotesk Project Authors
  (<https://github.com/floriankarsten/space-grotesk>): `style/fonts/OFL-SpaceGrotesk.txt`
- Space Mono, Copyright 2016 The Space Mono Project Authors
  (<https://github.com/googlefonts/spacemono>): `style/fonts/OFL-SpaceMono.txt`

The font files are unmodified upstream woff2 files. The licence texts ship in
the wheel under `share/jupyter/labextensions/jupyterlab-redis-theme/licenses/`.
If you replace or subset a font, re-read its OFL first.

## Provisional values — needs design review

- Dark palette uses the guide's *product extension* tokens, not official brand colours.
- Syntax-highlight hues (violet, teal, blue, green) are **not** from the brand
  guide, which defines none; they are chosen to pass 4.5:1 and live in one dict
  in the generator.
- Neutral tints (`bg2`, editor background, selections) are computed mixes.
- This theme has not been reviewed against `redis-product-ui`, which the brand
  guide says governs developer-tool UIs.

## Releasing

1. Bump `version` in `package.json` (the Python version is derived from it) and
   add an entry to `CHANGELOG.md`.
2. Commit, then tag and push: `git tag v0.1.1 && git push origin main v0.1.1`.
3. The `Release` workflow builds the sdist and wheel and publishes to PyPI via
   trusted publishing. One-time setup: on PyPI, add a trusted publisher for this
   repository with workflow `release.yml` and environment `pypi`.

Check a build locally first with `python -m build && twine check dist/*`.
