meltingice / CamanJS

Javascript HTML5 (Ca)nvas (Man)ipulation
http://camanjs.com
BSD 3-Clause "New" or "Revised" License
3.55k stars 404 forks source link

Value option for Curves plugin #38

Closed bebraw closed 12 years ago

bebraw commented 12 years ago

We discussed this briefly at #36 already. It appears "value" curve adjusts the overall contribution of color channels. Effectively this allows you to increase or decrease the value of all color channels at a same time making it handy for some quick color level adjustments. Mathematically speaking it would adjust (multiply) current color using given multiplier relative to normal.

I think the API for this could be quite simple. Probably having just something like this would work:

this.curves('v', [0, 0], [100, 120], [180, 240], [255, 255]);

Do you this sort of addition would be ok?