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

to_hex method #29

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

to_hex method #29

wants to merge 3 commits into from

Conversation

yohann84L
Copy link

As asked in #14. Added a to_hex() method for conversion from RGB, HSL, numeric to HEX string.


if s_t == 'hex':
return scale
elif s_t == 'numeric':

Choose a reason for hiding this comment

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

that could be elif s_t in ['numeric', 'rgb', 'hsl']

for s in scale:
s = s[s.find("(")+1:s.find(")")].replace(' ','').split(',')
numeric_scale.append( ( float(s[0]), float(s[1]), float(s[2]) ) )
elif s_t == 'hsl':

Choose a reason for hiding this comment

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

Why does the rgb and hsl behaviour need to diverge 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