-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fix incorrect HSL/HSLA conversion #4633
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some small fixes needed here. I like the conversion of channels container from array to object 👍🏻
Ok, I've updated API docs and slightly modified tests to also assert channels. |
…iginal format is also HSL/HSLA.
…itional info about types. Co-authored-by: Dariusz Jarzębski <d.jarzebski@cksource.com>
Rebased onto latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🎉
I've only fixed tests error messages and added test case for hex code without #
.
What is the purpose of this pull request?
Bug fix
Does your PR contain necessary tests?
All patches that change the editor code must include tests. You can always read more
on PR testing,
how to set the testing environment and
how to create tests
in the official CKEditor documentation.
This PR contains
Did you follow the CKEditor 4 code style guide?
Your code should follow the guidelines from the CKEditor 4 code style guide which helps keep the entire codebase consistent.
What is the proposed changelog entry for this pull request?
What changes did you make?
Due to the issue mentioned in #4597 (comment) I've introduced additional data saved for HSL colors (hue, saturation and lightness) alongside the concept of color type.
Additionally I added rounding of lightness value and fixed the issue with saturation being always 0 or 1, due to incorrect rounding.
Which issues does your PR resolve?
Closes #4597.
Note: this PR is a bug fix, however it's targeted to
major
as already merged changes (#4599) introduced some tests that have incorrect values and this PR fixes it.