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

[Metric] Opacity is ignored when passed as RGBA or HEX string #2183

Closed
dej611 opened this issue Sep 29, 2023 · 3 comments · Fixed by #2184
Closed

[Metric] Opacity is ignored when passed as RGBA or HEX string #2183

dej611 opened this issue Sep 29, 2023 · 3 comments · Fixed by #2184
Assignees
Labels
bug Something isn't working :colors colors related issue kibana cross issue Has a Kibana issue counterpart :Lens Kibana Lens related issue :metric Related to Metric chart

Comments

@dej611
Copy link
Contributor

dej611 commented Sep 29, 2023

Describe the issue

Screenshot 2023-09-29 at 14 55 01

Kibana Cross Issues
elastic/kibana#167636

@dej611 dej611 added bug Something isn't working kibana cross issue Has a Kibana issue counterpart :colors colors related issue :Lens Kibana Lens related issue :metric Related to Metric chart labels Sep 29, 2023
@nickofthyme
Copy link
Collaborator

This is due to the contrast logic, it's hard to accurately determine color contrast when an alpha values is present.

I think in the short-term we just disable the alpha assignment in the eui color picker, if practicable in lens, for assigning metric color.

I believe we had a similar issue with the partition chart slices a while back. Now I we just blend the foreground color with the background color to run contrast logic.

Notice in here it accurately chooses the text color and applies the opacity.

@dej611
Copy link
Contributor Author

dej611 commented Oct 2, 2023

I believe we had a similar issue with the partition chart slices a while back. Now I we just blend the foreground color with the background color to run contrast logic.

Wouldn't be possible to apply the same logic in there as well?
I think such logic should be commonly shared across all chart types.

Disabling the opacity in Lens may not be desiderable, as it breaks the consistency of the palette interface across chart types.

@nickofthyme
Copy link
Collaborator

Wouldn't be possible to apply the same logic in there as well?

Yeah totally, I think that is the best solution here I don't think it will be too difficult.

Disabling the opacity in Lens may not be desiderable, as it breaks the consistency of the palette interface across chart types.

Ah gotcha, then just disregard this idea. 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working :colors colors related issue kibana cross issue Has a Kibana issue counterpart :Lens Kibana Lens related issue :metric Related to Metric chart
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants