javascript - Converting color through library doesn't work correctly -


i'm trying make simple conversion color.js this library. able implement it, output shows wrong values. here's did:

var mycolor = new colors(); var hslcolor = mycolor.convertcolor({   h: 100,   s: 100,   v: 100 }, 'hsv2hsl'); 

output

object {h: 100, s: -1.0204081632653061, l: -4900}

it's doable see in convertiontest function @ line 517 did same thing i. doing wrong, , how can fix it?

jsfiddle

var mycolor = new colors();    var hslcolor = mycolor.convertcolor({    h: 100,    s: 100,    v: 100  }, 'hsv2hsl');  console.log(hslcolor);
<script src="https://rawgit.com/pitpik/colorpicker/master/colors.js"></script>

looks names should in caps:

var mycolor = new colors();    var hslcolor = mycolor.convertcolor({    h: 100,    s: 100,    v: 100  }, 'hsv2hsl');  console.log(hslcolor);
<script src="https://rawgit.com/pitpik/colorpicker/master/colors.js"></script>


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -