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

Changed color utility functions to maintain color format supplied #5230

Merged
merged 4 commits into from Oct 1, 2021

Conversation

cchaos
Copy link
Contributor

@cchaos cchaos commented Sep 30, 2021

I noticed in our Global Values page any time we were doing color calculations on hex values, the rgb() value was output which in turn confused the color picker. So I've updated these functions to attempt to maintain the same format that was passed in except for makeHighContrast() since we don't support alpha values anyway.

Before

Screen Shot 2021-09-29 at 18 16 58 PM

After

Screen Shot 2021-09-29 at 18 17 04 PM

Color utility page showing input vs output

Screen Shot 2021-09-30 at 18 17 21 PM

Checklist

  • Check against all themes for compatibility in both light and dark modes
  • [ ] Checked in mobile
  • Checked in Chrome, Safari, Edge, and Firefox
  • [ ] Props have proper autodocs and playground toggles
  • Added documentation
  • [ ] Checked Code Sandbox works for any docs examples Emotion is not working
  • [ ] Added or updated jest tests
  • [ ] Checked for breaking changes and labeled appropriately
  • [ ] Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@cchaos cchaos changed the title Changed color utility functions to output hex instead of .css() or rgb Changed color utility functions to maintain color format supplied Sep 30, 2021
@cchaos cchaos mentioned this pull request Sep 30, 2021
21 tasks
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5230/

Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
I pushed a commit with a little helper function

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5230/

@cchaos cchaos merged commit 443a64b into elastic:master Oct 1, 2021
@cchaos cchaos deleted the fix/color_functions_hex branch October 1, 2021 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants