Skip to content

Latest commit

 

History

44 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

D-Wave Theme

dwave-theme is a centralized theme and configuration package for creating unified, D-Wave-branded user interfaces and visualizations across D-Wave projects. It provides:

  • A central repository of D-Wave brand color palettes (qualitative, sequential) with light and dark variants.
  • Ready-to-use matplotlib style presets, such as default, dark, and presentation-light, as well as composable style components (base layout, typography, themes, and palettes) for building custom looks.
import matplotlib.pyplot as plt
import dwave.theme.matplotlib as dwave_theme

# List all available presets and components
dwave_theme.available_styles()

# Apply the standard D-Wave look globally
dwave_theme.set_theme()

# Or apply the dark preset
dwave_theme.set_theme("dark")

# Temporarily switch styles for a specific figure
with dwave_theme.context("presentation-light"):
    plt.plot([1, 2, 3])
    plt.savefig("slide.png")

# Preview the available color palettes
dwave_theme.show_palettes()

Installation

Installation from PyPI:

pip install dwave-theme

During package development, it is often convenient to use an editable install:

pip install --editable .

Testing

All code should be thoroughly tested and all pull requests should include tests.

To run the tests, first install the package using an editable install as described above, along with the test dependencies:

pip install --group test

The tests can then be run with pytest:

pytest tests/

Versioning

This package follows semantic versioning: breaking changes to the public API are only introduced in major releases.

License

Released under the Apache License 2.0. See LICENSE file.

Contributing

Ocean's contributing guide has guidelines for contributing to Ocean packages.

Release Notes

dwave-theme makes use of reno to manage its release notes.

When making a contribution to dwave-theme that will affect users, create a new release note file by running:

reno new your-short-descriptor-here

You can then edit the file created under releasenotes/notes/. Remove any sections not relevant to your changes. Commit the file along with your changes.

See reno's user guide for details.

About

A centralized visual theme package for D-Wave projects: brand color palettes and matplotlib styling for Dash demos, applications, and documentation.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages