Skip to content

pdfTheme: Add dark mode theme variant with WCAG AA contrast compliance #699

Description

@Kingsman-99

Description

pdfTheme defines a single light colour scheme for PDF exports. Contributors should add a darkTheme export that uses a dark background with light text, and update the PDF generation caller to select the theme based on a preferDark parameter, so users who work in dark mode can get matching PDF receipts.

Acceptance Criteria

  • A darkTheme object is exported from src/lib/pdfTheme.ts with background, text, and accent colour definitions
  • The dark theme passes WCAG AA contrast ratio requirements (verified by src/lib/contrast.ts)
  • PDF generation code accepts a preferDark: boolean parameter and applies the correct theme
  • Existing tests continue to pass

Context

  • Target file: src/lib/pdfTheme.ts
  • Contrast checker: src/lib/contrast.ts

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions