-
Notifications
You must be signed in to change notification settings - Fork 3.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
Add Color.toCssHexString and unit tests #8987
Conversation
Thank you so much for the pull request @ErixenCruz! I noticed this is your first pull request and I wanted to say welcome to the Cesium community! The Pull Request Guidelines is a handy reference for making sure your PR gets accepted quickly, so make sure to skim that.
Reviewers, don't forget to make sure that:
|
What's the use case for this? |
Also, hex strings with alpha work everywhere but IE11, so I'm not sure why we would leave alpha off: https://caniuse.com/#feat=css-rrggbbaa |
I had a use case for this. There was a 3rd party component i wanted to send a color value to that only accepted hex strings |
+1 for using |
@hpinkos Updated with your feedback. |
CHANGES.md
Outdated
@@ -4,6 +4,7 @@ | |||
|
|||
##### Breaking Changes :mega: | |||
|
|||
- Added `Color.toCssHexString` for getting the CSS hex string equivalent for a color. |
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.
This should go under the Additions
section instead of the Breaking Changes
section
@ErixenCruz Be sure to add yourself to https://github.com/CesiumGS/cesium/blob/master/CONTRIBUTORS.md under the CesiumGS section! |
@ErixenCruz yes please! I think this PR will be ready to be merged first, and we should add your name to the contributors list when this goes in |
@hpinkos Pushed commit with your feedback. Thanks. |
Co-authored-by: Sean Lilley <[email protected]>
@lilleyse Updated. |
@ErixenCruz thanks! Looks good. |
This is very useful, thank you! |
Added
Color.toCssHexString
for getting the CSS hex string equivalent for a color.