Skip to content

added human readable colour support #120

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

Closed
wants to merge 1 commit into from
Closed

added human readable colour support #120

wants to merge 1 commit into from

Conversation

ste2425
Copy link
Contributor

@ste2425 ste2425 commented Jan 18, 2016

This will allow the picker to be given a human readable colour. Such as Red or Green. It will then parse that into a RGB colour code ignoring the set colour format.

Only when the picker is interacted with will it then use the set format. This is existing behaviour however. If it is set for HEX but given an RGB it will render and not change the format to HEX until the picker is interacted with.

It leverages getComputedStyle so has no jQuery dependency and does a check to see if it is supported before trying to use it. If its not supported the colour won't be converted.

this is in relation to issue #116

@ste2425
Copy link
Contributor Author

ste2425 commented Jan 18, 2016

Dam I didn't commit the changes. This currently implements .startsWith() but it isn't fully cross browser. I modified it to use .indexOf() I don't know how I managed to forget to commit it. I sort it now.

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.

2 participants