Skip to content

Conversation

TheMarteh
Copy link
Contributor

@TheMarteh TheMarteh commented Dec 4, 2024

fixes #1686

  • I have read the Contribution Guidelines
  • I have commented on the issue above and discussed the intended changes
  • A maintainer has signed off on the changes and the issue was assigned to me
  • All newly added code is adequately covered by tests
  • All existing tests are still running without errors
  • The documentation was modified to reflect the changes OR no documentation changes are required.

Changes

I've added character doubling functionality to the fromHex method if the sanitized string contains exactly 3 characters.
I've also added some tests to confirm the resulting color matches the color when using the 6-digit representation.

I did not update any docs, as the docs of the original fromHex seems adequate to me.


Please upvote 👍 this pull request if you are interested in it.

@TheMarteh
Copy link
Contributor Author

@microsoft-github-policy-service agree

Copy link
Contributor

@patriksvensson patriksvensson left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@patriksvensson patriksvensson merged commit 58bf89a into spectreconsole:main Dec 4, 2024
3 checks passed
@patriksvensson
Copy link
Contributor

Merged! Thank you for your contribution. Much appreciated! 👍

@TheMarteh TheMarteh deleted the feature/3digithexcodes branch December 4, 2024 15:38
@FrankRay78
Copy link
Contributor

You've stolen another PR from me @patriksvensson! Lucky you're the boss...

@patriksvensson
Copy link
Contributor

Hahaha. I'm NOT the boss! 😁

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.

Allow Colors to be created from 3-digit hexadecimal codes

3 participants