Skip to content

TP-04 — Add Querya theme color parser wrapper #99

Description

@ZhuchkaTriplesix

Epic: A
Depends on: TP-03

Source: docs/theme-parser-github-issues.md

Goal

Support Querya custom HEX formats without duplicating incompatible color parsing logic.

Files

  • lib/core/theme/parser/color_parser.dart
  • test/core/theme/parser/color_parser_test.dart

Implementation

Add:

Color parseQueryaThemeColor(String raw)

Behavior:

  • trim whitespace;
  • accept #RRGGBB;
  • accept RRGGBB;
  • accept #AARRGGBB;
  • accept AARRGGBB;
  • delegate to parseVsCodeColor where possible;
  • throw FormatException for invalid input.

If current parseVsCodeColor already supports all formats, implement this wrapper as normalization + delegate.

Acceptance Criteria

  • Wrapper exists and is used by custom theme factory.
  • No second unrelated parser implementation.
  • Error messages mention the invalid value.

Tests

Cases:

  • #1E1E1E
  • 1E1E1E
  • #FF1E1E1E
  • FF1E1E1E
  • lowercase hex
  • invalid length
  • invalid characters
  • empty string

Metadata

Metadata

Assignees

No one assigned

    Labels

    parserTheme parser epic label: parsertestsTheme parser epicthemeTheming, colors, VS Code themes

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions