Metadata-Version: 2.4
Name: dash-dracula-theme
Version: 0.1.2
Summary: Dracula dark/light theme for Plotly Dash applications
Author: hjeverts-VSM
License: MIT License
        
        Copyright (c) 2026 hjeverts-VSM
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: dash>=4.0
Requires-Dist: plotly>=5.0
Requires-Dist: dash-bootstrap-components>=2.0
Provides-Extra: pdf
Requires-Dist: reportlab>=4.0; extra == "pdf"
Requires-Dist: kaleido>=0.2; extra == "pdf"
Dynamic: license-file

# Dracula for [Dash](https://dash.plotly.com/)

> A dark theme for [Plotly Dash](https://dash.plotly.com/) — pip-installable Python package
> that gives any Dash application the full Dracula colour experience, including a light-mode
> toggle and always-light PDF export.

| Dark mode | Light mode |
|---|---|
| ![Dark mode](https://raw.githubusercontent.com/hjeverts-VSM/dracula-dash/master/screenshot_dark.png) | ![Light mode](https://raw.githubusercontent.com/hjeverts-VSM/dracula-dash/master/screenshot_light.png) |

## Install

All instructions can be found at [INSTALL.md](INSTALL.md).

## Features

- **Dark mode** — full Dracula palette applied via CSS variables and a custom Plotly template
- **Light mode toggle** — single button switches the entire dashboard; all Plotly graphs
  re-colour automatically via a clientside callback
- **PDF export** — `fig_to_print_image()` always produces print-ready figures on a white
  background, regardless of the current dashboard theme
- **Official palette** — all 11 Dracula colours exposed as named Python constants
  (`BACKGROUND`, `CYAN`, `PURPLE`, …)

## Quick start

```python
import dash
import dash_bootstrap_components as dbc
import dash_dracula as dr

# 1. Create the app with Bootstrap DARKLY as base
app = dash.Dash(__name__, external_stylesheets=[dbc.themes.DARKLY])

# 2. Wire the Dracula theme (copies CSS, registers clientside toggle)
theme_store = dr.apply_theme(app)          # returns dcc.Store for the layout

# 3. Use Dracula colours and template in your figures
fig = go.Figure(layout=dict(template="dracula"))
fig.add_scatter(y=[1, 2, 3], line_color=dr.CYAN)

# 4. Export a figure to a print-ready ReportLab Image (always light)
from dash_dracula.pdf import fig_to_print_image
img = fig_to_print_image(fig, w_mm=170, h_mm=100)
```

See [sample/app.py](sample/app.py) for a complete minimal example.

## Team

This theme is maintained by the following person(s) and a bunch of
[awesome contributors](https://github.com/dracula/dash/graphs/contributors).

| [hjeverts](https://github.com/hjeverts) |
|---|

## Community

- [GitHub](https://github.com/dracula/dracula-theme/discussions) — Best for asking questions and discussing issues.
- [Discord](https://draculatheme.com/discord-invite) — Best for hanging out with the community.

## License

[MIT License](LICENSE)
