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

Color picker background color is dependent on the currently selected color not the current hue #4441

Closed
scieslacs opened this issue Nov 14, 2017 · 4 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@scieslacs
Copy link

There is no guarantee in receiving a response in GitHub Issue Tracker, If you'd like to secure our response, you may consider PrimeNG PRO Support where support is provided within 4 business hours

I'm submitting a ... (check one with "x")

[X ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports)
No need for a plunkr, issue is present on color picker documentation:
https://www.primefaces.org/primeng/#/colorpicker

Current behavior
The color selector background-color is dependent on the currently selected color instead of the currently selected hue. This is most evident when the color bubble is on the left side of the color selector. This results in the color selector showing false values:
image

Expected behavior
The color selector's background color should always be dependent on the color value in the hue selector.
image

Minimal reproduction of the problem with instructions
Go to the documentation site for the color picker https://www.primefaces.org/primeng/#/colorpicker
Move the color selector "bubble" to the left side of the color selector.
Change the hue selector.
Notice the color selector is now primarily greyscale.
If you then change the bubble again, it selects the correct color, not what is shown in the selector.

What is the motivation / use case for changing the behavior?
The color selector bubble should always show the same color spectrum if the hue slider has not changed.

  • Browser:
    Tested in Chrome, FireFox, Edge - Windows 10
@cagataycivici cagataycivici added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working Status: Pending Review Issue or pull request is being reviewed by Core Team labels Nov 17, 2017
@cagataycivici cagataycivici added this to the 5.FUTURE milestone Nov 17, 2017
@DavyDeDurpel
Copy link

It's a very easy fix but I don't have the time to create a pull request for it. This is how to fix it:

updateColorSelector () {
let bgValue = {};
bgValue.s = 100;
bgValue.b = 100;
bgValue.h = this.value.h;
this.colorSelectorViewChild.nativeElement.style.backgroundColor = '#' + this.HSBtoHEX(bgValue);
};

@cagataycivici cagataycivici removed this from the 5.FUTURE milestone Jan 15, 2018
@AndreaBarbasso
Copy link
Contributor

@cagataycivici @Merve7 any chance to see this fixed? It's been some time... 😞

@jgill248
Copy link

bump

@giacomarco
Copy link

giacomarco commented May 23, 2018

the @DavyDeDurpel solution works great!
the problem persists in version 6.0.0-alpha.1 @cagataycivici

bethany-dawn added a commit to bethany-dawn/primeng that referenced this issue Jul 11, 2018
@cagataycivici cagataycivici removed the Status: Pending Review Issue or pull request is being reviewed by Core Team label Jul 26, 2018
@cagataycivici cagataycivici added this to the 6.0.2 milestone Jul 26, 2018
@cagataycivici cagataycivici self-assigned this Jul 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

6 participants