Fooidge / PleaseJS

JavaScript Library for creating random pleasing colors and color schemes
2.28k stars 159 forks source link

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

Open Madd0g opened 9 years ago

Madd0g commented 9 years ago

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 commented 9 years ago

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 commented 8 years ago

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

jmanuel1 commented 8 years ago

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