Skip to content

Deduplicate getContrastColor into shared colorResolver utility #156

Description

@pglevy

ButtonWidget.tsx (line 102) and ApplicationHeader.tsx (line 95) each define their own inline getContrastColor function with identical WCAG luminance logic.

Now that getContrastColor is exported from src/utils/colorResolver.ts (added in #155), those two components can import the shared version instead.

Scope: Replace the inline functions in ButtonWidget and ApplicationHeader with imports from colorResolver.ts. No behavior change — just removing duplication.

Files:

  • src/components/Button/ButtonWidget.tsx
  • src/components/ApplicationHeader/ApplicationHeader.tsx
  • src/utils/colorResolver.ts (already done)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions