Add dark mode benchmark image

Merged
AL
3mo ago
+139-16

Summary

  • add a dark-themed benchmark render using the same data, annotations, and dimensions as the existing light image
  • switch the README benchmark image with a theme-aware <picture> element
  • add --color-scheme dark support to the benchmark plot exporter and document the reproduction command

Why

The README referenced only the light benchmark PNG, so it remained a bright white panel when GitHub was viewed in dark mode. The new source selection keeps the benchmark legible and visually consistent with the active color scheme.

Impact

GitHub automatically serves the dark benchmark image for dark-mode readers while retaining the existing light image as the fallback. Future dark assets can be regenerated from the benchmark source instead of being hand-edited.

Validation

  • uv run --with pre-commit pre-commit run --all-files
  • uv run ruff check .
  • uv run ruff format --check .
  • verified README source selection, dark chart theme tokens, and 2000×1040 PNG dimensions

Summary by CodeRabbit

  • New Features

    • Added dark-mode support for benchmark charts and images.
    • Added a command-line option to generate charts in light or dark color schemes.
    • Benchmark images now automatically display the appropriate asset based on the selected color scheme.
    • Standardized benchmark chart styling across generated charts and documentation demos.
  • Documentation

    • Updated benchmark reproduction instructions with the dark-mode chart command.