Skip to content

feat: dark theme foundation — config.toml, Plotly template, CSS #23

@jschloman

Description

@jschloman

Summary

Establish the visual design system used by all subsequent visualization issues. This is a prerequisite for all other UI work.

See mockup: assets/dashboard_mockup.png

Palette — Deep Space Indigo

Role Hex
App background #0c1120
Card background #141c2f
Sidebar background #090e1a
Lifted / hover #1e293b
Border #2d3a52
Primary text #f0f4ff
Secondary text #8895a7
Muted text #4b5a72
Primary accent (indigo) #6366f1
Chart 2 (cyan) #22d3ee
Chart 3 (pink) #f472b6
Chart 4 (purple) #a855f7
Chart 5 (green) #22c55e
Chart 6 (orange) #f97316
Chart 7 (yellow) #facc15

Deliverables

1. .streamlit/config.toml

[theme]
base = "dark"
primaryColor = "#6366f1"
backgroundColor = "#0c1120"
secondaryBackgroundColor = "#141c2f"
textColor = "#f0f4ff"
borderColor = "#2d3a52"
font = "Inter:https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"
chartCategoricalColors = ["#6366f1","#22d3ee","#f472b6","#a855f7","#22c55e","#f97316","#facc15"]

2. core/theme.py — global Plotly template

Define an autobio_dark Plotly template and set it as pio.templates.default. Import this module once at the top of visualize.py so all px.* charts inherit it automatically. Template must set paper_bgcolor, plot_bgcolor, font, colorway, axis grid colors, hover label styling, and legend styling.

3. CSS injection in visualize.py

Inject via st.markdown(..., unsafe_allow_html=True):

  • Hide Streamlit's default header/footer chrome
  • .block-container { padding-top: 1.5rem } for tighter layout
  • Card border-radius and box-shadow defaults

4. requirements.txt

Add streamlit-extras for style_metric_cards().

Acceptance criteria

  • streamlit run visualize.py loads with dark background, Inter font, indigo accent
  • All existing px.* charts automatically use the dark template without per-chart changes
  • ruff check ., mypy, and pytest all pass
  • No hardcoded personal data introduced

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions