Metadata-Version: 2.4
Name: jmu-colors
Version: 0.1.2
Summary: Color schemes of JMU Würzburg for matplotlib, seaborn, and plotly.
Author-email: Moritz Schillinger <moritz.schillinger@fau.de>
License: MIT
Project-URL: Homepage, https://github.com/Mo-Sc/jmu-colors
Project-URL: Repository, https://github.com/Mo-Sc/jmu-colors
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib>=3.0.0
Dynamic: license-file

# JMU Colors

[![PyPI](https://img.shields.io/pypi/v/jmu-colors)](https://pypi.org/project/jmu-colors/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A lightweight Python package providing the color scheme of the Julius-Maximilians-Universität Würzburg for Matplotlib, Seaborn, Plotly, and Latex, according to the 03 / 2024 Corporate Design Manual. Inspired by [fau-colors](https://github.com/mad-lab-fau/fau_colors).

**Maintained independently; not an official repository of JMU**

## Color Overview

**Primary Colors:**
- $\color{#063D79}{\text{■ dunkelblau (063D79)}}$
- $\color{#D8DADC}{\text{■ grau (D8DADC)}}$

**Secondary Colors:**
- $\color{#50BBB0}{\text{■ mint (50BBB0)}}$
- $\color{#8573B3}{\text{■ violett (8573B3)}}$
- $\color{#447DC0}{\text{■ blau (447DC0)}}$
- $\color{#86BE84}{\text{■ gruen (86BE84)}}$
- $\color{#660954}{\text{■ berry (660954)}}$
- $\color{#009FE3}{\text{■ cyan (009FE3)}}$


## Installation

```bash
pip install jmu-colors
```


## Python Usage

The package automatically registers `jmu_primary`, `jmu_secondary`, and `jmu_all` as colormaps in matplotlib when imported.

### Define Sample Data

```python
import pandas as pd

df = pd.DataFrame({
    'Department': ['A', 'B', 'C', 'D', 'E'],
    'Students': [150, 240, 110, 180, 200],
})
```

### Matplotlib
```python
import matplotlib.pyplot as plt
import jmu_colors

# Matplotlib using a registered colormap
plt.scatter(df['Department'], df['Students'], c=df.index, cmap='jmu_all', s=300)
plt.show()
```

### Seaborn
```python
import seaborn as sns
import jmu_colors

# Seaborn using global color palette
sns.set_palette('jmu_secondary')
sns.barplot(data=df, x='Department', y='Students', hue='Department', legend=False)
plt.show()
```


### Plotly
```python
import plotly.express as px
from jmu_colors import ALL_COLORS

# Plotly accepts hex lists natively. Just pass the raw colors.
fig = px.bar(
    df, 
    x="Department", 
    y="Students", 
    color="Department", 
    color_discrete_sequence=list(ALL_COLORS.values()),
)
fig.show()
```

## LaTeX Usage

Copy the `latex/jmu-colors.sty` file into your LaTeX project folder.

```latex
\documentclass{article}
\usepackage{jmu-colors}

\begin{document}
\textcolor{jmu-dunkelblau}{This text is JMU dark blue!}
\end{document}
```
