graypegg / chromatism

:rainbow: A simple set of utility functions for colours.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hsl-->rgb,error is a little big

edenYfb opened this issue · comments

chromatism.convert( { h: 300, s: 100, l: 50 } ).rgb
//-->{r:253.47, g:0, b:254.49}-->Math.round()-->253,0,254
i want it can be {r:255, g:0, b:255}, after Math.round()

Then write a round function that does that. Math.round does not work that way.

ok, i try it