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

Convert to HSL #3

Open
eknowles opened this issue Feb 2, 2019 · 0 comments
Open

Convert to HSL #3

eknowles opened this issue Feb 2, 2019 · 0 comments

Comments

@eknowles
Copy link
Owner

eknowles commented Feb 2, 2019

Look at simplifying the algorithm to a string to number between 0-359 for hue.
The user can then request a saturation, lightness, alpha separately.

e.g.

convert(hue: number | boolean, saturation: number | boolean, lightness: number | boolean)(str: string)

create the factory fn first with your rules.

if first arg is true then a number will be generated for the string
if false it will use the default (hue: 50 saturation: 100, lightness: 50)
when given a number it will fix as that.

this could be useful when have different color groups. i.e. in data visualisation for subgroups.

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

No branches or pull requests

1 participant