CI Health Check & Quality Gate / Code, dbt & Live App Health Check (pull_request) Successful in 1m11s
42 lines
1.1 KiB
Python
42 lines
1.1 KiB
Python
import plotly.graph_objects as go
|
|
|
|
# Arena Nocturne Design Tokens
|
|
AMBER = "#E09F3E"
|
|
OBSIDIAN = "#0B0F17"
|
|
SURFACE = "#151D2A"
|
|
SURFACE_SUBTLE = "#1E293B"
|
|
BORDER = "#26354A"
|
|
MADE_EMERALD = "#10B981"
|
|
MISS_CRIMSON = "#F43F5E"
|
|
TEXT_WHITE = "#F1F5F9"
|
|
TEXT_CHALK = "#94A3B8"
|
|
COURT_FLOOR = "#0D141E"
|
|
COURT_LINE = "#64748B"
|
|
|
|
# Diverging & sequential scales aligned to Arena Nocturne
|
|
ARENA_DIVERGING_SCALE = [
|
|
[0.0, "#F43F5E"],
|
|
[0.5, "#E09F3E"],
|
|
[1.0, "#10B981"],
|
|
]
|
|
|
|
|
|
def apply_arena_theme(fig: go.Figure, height: int | None = None) -> go.Figure:
|
|
"""Apply consistent Arena Nocturne styling to a Plotly figure."""
|
|
layout_updates = dict(
|
|
paper_bgcolor="rgba(0,0,0,0)",
|
|
plot_bgcolor="rgba(13, 20, 30, 0.55)",
|
|
font=dict(color=TEXT_WHITE),
|
|
xaxis=dict(gridcolor=SURFACE_SUBTLE, zerolinecolor=BORDER),
|
|
yaxis=dict(gridcolor=SURFACE_SUBTLE, zerolinecolor=BORDER),
|
|
hoverlabel=dict(
|
|
bgcolor=SURFACE,
|
|
bordercolor=AMBER,
|
|
font=dict(color=TEXT_WHITE),
|
|
),
|
|
)
|
|
if height is not None:
|
|
layout_updates["height"] = height
|
|
fig.update_layout(**layout_updates)
|
|
return fig
|