Skip to content

Remove duplicate contrast color function from BaseViewRenderer#30

Merged
thedhanawada merged 1 commit intomasterfrom
fix/remove-duplicate-contrast-fn
Feb 19, 2026
Merged

Remove duplicate contrast color function from BaseViewRenderer#30
thedhanawada merged 1 commit intomasterfrom
fix/remove-duplicate-contrast-fn

Conversation

@thedhanawada
Copy link
Copy Markdown
Contributor

Summary

  • `BaseViewRenderer.getContrastingTextColor()` duplicated the same logic as `StyleUtils.getContrastColor()` using a different formula (WCAG luminance vs YIQ)
  • Replaced with a thin delegation to `StyleUtils.getContrastColor()` as the single source of truth
  • Eliminates maintenance burden of two diverging implementations

Test plan

  • Verify event text color contrast still works
  • Run `npm test`

BaseViewRenderer.getContrastingTextColor() duplicated the same logic as
StyleUtils.getContrastColor() using a different formula (WCAG luminance
vs YIQ). Replaced the full implementation with a delegation to
StyleUtils.getContrastColor() as the single source of truth.
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
force-calendar-interface Ready Ready Preview, Comment Feb 19, 2026 9:48am

@thedhanawada thedhanawada merged commit cd655a7 into master Feb 19, 2026
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant