TinyColor icon indicating copy to clipboard operation
TinyColor copied to clipboard

Analogous returning original colors

Open spdaly opened this issue 9 years ago • 1 comments

I'm attempting to use TinyColor to create a set of custom tab colors for a page. The following code runs, but the resulting objects are the same color (#5c5c5c).

var tabs = $('polygon');
var color = tinycolor('#5c5c5c');
var colors = color.analogous(results = 6, slices = 30)

tabs.each(function(index){
    console.log(colors[index].toHexString());
    $(this).attr('fill', colors[index].toHexString());
})

spdaly avatar May 21 '15 18:05 spdaly

My color theory is obviously lacking... I tried the 5c5c5c on the demo site and got the same results. I guess my initial color just doesn't have an analogous set.

spdaly avatar May 21 '15 18:05 spdaly