Skip to content

Update ColorConversionExtensions.shared.cs#2945

Merged
TheCodeTraveler merged 2 commits intoCommunityToolkit:mainfrom
stephenquan:feature/stephenquan/color-invariant-sq
Nov 17, 2025
Merged

Update ColorConversionExtensions.shared.cs#2945
TheCodeTraveler merged 2 commits intoCommunityToolkit:mainfrom
stephenquan:feature/stephenquan/color-invariant-sq

Conversation

@stephenquan
Copy link
Contributor

@stephenquan stephenquan commented Nov 17, 2025

Description of Change

This PR fixes a culture-specific formatting issue in the ToCmykaString() method to ensure consistent behavior across different culture settings.

  • Updated ToCmykaString() to explicitly use the provided CultureInfo parameter for all numeric formatting operations
  • Replaced interpolated string format specifiers (:P0) with explicit ToString("P0", cultureInfo) calls

Linked Issues

PR Checklist

  • Has a linked Issue, and the Issue has been approved(bug) or Championed (feature/proposal)
  • Has tests (existing test passes with this change)
  • Has samples (no change in samples needed since there was no API change)
  • Rebased on top of main at time of PR
  • Changes adhere to coding standard
  • Documentation created or updated: (no change needed since there was no API change)

Additional information

I forced the CurrentInfo.CurrentCulture to "de-DE" to repro the failing xUnit test problem and applied fixes until the xUnit tests started passing.

Copilot AI review requested due to automatic review settings November 17, 2025 02:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a culture-specific formatting issue in the ToCmykaString() method to ensure consistent behavior across different culture settings.

  • Updated ToCmykaString() to explicitly use the provided CultureInfo parameter for all numeric formatting operations
  • Replaced interpolated string format specifiers (:P0) with explicit ToString("P0", cultureInfo) calls

@TheCodeTraveler TheCodeTraveler enabled auto-merge (squash) November 17, 2025 03:57
@TheCodeTraveler TheCodeTraveler merged commit 03e9a06 into CommunityToolkit:main Nov 17, 2025
9 of 11 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants