Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x] Add Hex To Rgb modifier #9582

Merged
merged 6 commits into from
Feb 26, 2024
Merged

Conversation

DanielDarrenJones
Copy link
Contributor

@DanielDarrenJones DanielDarrenJones commented Feb 24, 2024

Adds a new modifier that takes a hex value and turns it into RGB, this can be useful when working with the colour field type.

It takes a hex value with any number of hashes at the start and converts it into the 3 rgb component values seperated with a space and a comma. For example: #FF269E becomes 255, 38, 158

It does not currently throw any exceptions or errors for malformed hex values, please let me know if / how you would like this to be handled and I can update this PR.

Adds a new modifier that takes a hex value and turns it into RGB, this can be useful when working with the colour field type.
@DanielDarrenJones DanielDarrenJones changed the title Add Hex To RGB modifier Add Hex To Rgb modifier Feb 24, 2024
@DanielDarrenJones DanielDarrenJones changed the title Add Hex To Rgb modifier [4.x] Add Hex To Rgb modifier Feb 24, 2024
@DanielDarrenJones DanielDarrenJones marked this pull request as ready for review February 24, 2024 00:55
@jasonvarga jasonvarga merged commit 815e154 into statamic:4.x Feb 26, 2024
18 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.

None yet

2 participants