-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
feat(Util): add HSV and HSL color format support #9756
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://discord-js-git-fork-codeblitz97-main-discordjs.vercel.app/ |
I'm opposed to supporting this, for starters, users could expect the array overload (always RGB) to be HSL or HSV. However, later we would face the issue where people want to use full names ( And that's not to mention the users who would like to use other colour formats, e.g. CIELUV, CIELAB, HSLuv, LCh (which is a cylindrical transformation of the two first), and so on. At that point, it's better to just use a dedicated color library such as |
I definitely concur with @kyranet's main point. I don't think this should be added to .setColor (not in builders, nor in discord.js), and instead utility methods should be used |
You all think this should not be added? |
I'm not entirely against it. I think it has its place. But as mentioned before already, there is a library that basically does this already 😅 |
So I'll just close the PR? |
In this pull request, I've made significant enhancements to the
resolveColor
function, empowering it to now handle HSL (Hue, Saturation, Lightness) and HSV (Hue, Saturation, Value) color representations. This addition not only broadens the spectrum of colors we can work with but also opens up exciting creative possibilities.As someone who's passionate about colors, I truly believe that this enhancement will add a new layer of versatility to our projects. Whether you're aiming for a vibrant and eye-catching design or a more subtle and elegant palette, the flexibility of using HSL and HSV can take your color schemes to the next level.
To showcase the power of these additions, I've included usage examples below:
Using HSV on an embed:
Or experimenting with HSL:
I'm confident that this enhancement will enhance our color-handling capabilities and elevate the visual aesthetics of our projects.
Looking forward to your feedback and suggestions as we continue to make strides in delivering exceptional experiences through our codebase. Thanks for considering these changes!