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

Added support for hex code colors #276

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

fredbradley
Copy link

Add support for hex code colors rather than RGB.

Usage:

(new Generator)->color('#fff')->backgroundColor('#000');

Usage for Eye color is slightly different due to complexity:

(new Generator)->eyeColorFromHex(0, '#fff', '#000');

Test suite: I had trouble validating the "getAlpha()" methods on the test suite, but I couldn't work out why as the code should be the same. But Hex codes don't have alpha so it wouldn't make a difference to end result, but if someone can solve the test suite (currently commented out)

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.

1 participant