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

Documentation about colors_returned=1 says you only get one, I expected a string #56

Open
Madd0g opened this issue Oct 22, 2015 · 3 comments

Comments

@Madd0g
Copy link

Madd0g commented Oct 22, 2015

According to the docs, I expected a string out of this when passing colors_returned: 1

        return Please.make_color({
            base_color: color,
            colors_returned: 1,
            format: 'hex'
        });

I'm getting an array with one color in it

The docs say:

If you set it to 1, you'll just get the one color! It makes a sort of sense if you think about it.

Maybe I'm overthinking it? :)

@Madd0g
Copy link
Author

Madd0g commented Oct 22, 2015

Also, given the same base_color, hue, value and saturation, shouldn't I get the same modified color every time? I'm seeing slightly different color every time.

@jmanuel1
Copy link
Contributor

jmanuel1 commented Jun 9, 2016

The colors_returned option is behaving correctly, the docs are out of date.

jmanuel1 added a commit to jmanuel1/PleaseJS that referenced this issue Jun 9, 2016
Please *always* returns an array. See issue Fooidge#56.
@jmanuel1
Copy link
Contributor

jmanuel1 commented Jun 9, 2016

Also, looking at the code, base_color is mutually exclusive with hue, saturation, and value. base_color will take priority in this case.

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

2 participants