-
Notifications
You must be signed in to change notification settings - Fork 270
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(ui5-color-picker): add HSL color selection #10157
base: main
Are you sure you want to change the base?
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.
There is the following bug:
- Change to HSL mode from the button
- Input 30 for H press Tab
- Input 20 for S press Enter
Expected:
The values in the sliders and in the gradient field are updated according to the lastly entered saturation value.
} | ||
|
||
get colorChannelInputs() { | ||
if (!this._displayHSL) { |
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.
You could return on one line with a ternary operator.
} | ||
|
||
this._setColor(tempColor); | ||
this._setColor(); |
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.
It is not very clear to me which color gets set like this. The relation between the _colorValue
internal property and _setColor
is vague. It's more like we update the value
property according to the current state of the _colorValue
. Maybe the function name doesn't fit anymore.
|
||
set RGB(value: ColorRGB) { | ||
this._rgb = value; | ||
if (this._valid) { |
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.
When did this._valid
got updated to correspond to the newly given RGB?
If your starting color is HSL 0, 0, 100, Changing the hue from the input should update the hue slider to around orange, but since the light is still 100, no matter what you set the saturation or hue to, the color will still be white, so the main color picker wont get updated. |
My point is that even if the main color doesn't change those interactions from the openui5 project do reflect the input values with more detail. |
This change introduces the ability to select colors using HSL channels. Users can now toggle between viewing color values as RGB or HSL by selecting the↔️ button.
Fixes: #10275