Skip to content

Fix HSL example values on Color field page - #795

Closed
brandonkelly wants to merge 1 commit into
mainfrom
fix-color-hsl
Closed

brandonkelly wants to merge 1 commit into
mainfrom
fix-color-hsl

Conversation

@brandonkelly

Copy link
Copy Markdown
Member

Summary

The Color field page's ColorData examples gave the wrong HSL values for #e5422b:

- getHsl()        → hsl(7,81%,90%)    getLightness() → 90    getSaturation() → 81
+ getHsl()        → hsl(7,78%,53%)    getLightness() → 53    getSaturation() → 78

The new values match the hsla(7,78%,53%,0.5) example added for 5.12 (#794).

Evidence

I ran the RGB→HSL math in craft\fields\data\ColorData::_hsl() on rgb(229,66,43) and got [7, 78, 53].

@brandonkelly
brandonkelly requested a review from a team as a code owner November 3, 2026 20:13
@netlify

netlify Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for craft-docs ready!

Name Link
🔨 Latest commit 828061e
🔍 Latest deploy log https://app.netlify.com/projects/craft-docs/deploys/6aea4088817828625a0765cd
😎 Deploy Preview https://deploy-preview-795--craft-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@AugustMiller

Copy link
Copy Markdown
Contributor

I was in the middle of some other Color field cleanup on craft-5.12, so I merged it over there. ✌️

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.

2 participants