from __future__ import annotations

import matplotlib as mpl


COLORS = {
    "classical": "#D55E00",
    "quantum": "#0072B2",
    "gap": "#009E73",
    "shade": "#56B4E9",
    "highlight": "#E69F00",
    "accent": "#CC79A7",
    "gray": "#999999",
    "black": "#000000",
    "light_gray": "#EEEEEE",
    "seed": "#FCEDCB",
    "quantum_light": "#D6E8F3",
    "white": "#FFFFFF",
    # Backwards-compatible aliases used by the supplementary schematic.
    "blue": "#0072B2",
    "red": "#D55E00",
    "green": "#009E73",
    "orange": "#E69F00",
    "purple": "#CC79A7",
    "dark": "#000000",
}


def apply_style() -> None:
    mpl.rcParams.update(
        {
            "font.family": "serif",
            "font.serif": ["Times New Roman", "Times", "DejaVu Serif"],
            "mathtext.fontset": "stix",
            "mathtext.default": "regular",
            "font.size": 8,
            "axes.labelsize": 9,
            "axes.labelweight": "bold",
            "axes.titlesize": 9,
            "legend.fontsize": 7,
            "xtick.labelsize": 9,
            "ytick.labelsize": 9,
            "axes.linewidth": 0.8,
            "axes.spines.top": False,
            "axes.spines.right": False,
            "axes.labelpad": 3,
            "xtick.direction": "out",
            "ytick.direction": "out",
            "xtick.major.size": 3,
            "ytick.major.size": 3,
            "xtick.major.width": 0.6,
            "ytick.major.width": 0.6,
            "lines.linewidth": 1.2,
            "lines.markersize": 4,
            "legend.frameon": False,
            "legend.handlelength": 1.5,
            "pdf.fonttype": 42,
            "ps.fonttype": 42,
            "figure.dpi": 150,
            "savefig.dpi": 600,
            "savefig.bbox": "tight",
            "savefig.pad_inches": 0.02,
        }
    )
