MCPcopy Index your code
hub / github.com/clips/pattern / adjust_saturation

Function adjust_saturation

pattern/canvas.js:3114–3119  ·  view source on GitHub ↗
(pixels, m)

Source from the content-addressed store, hash-verified

3112 });
3113 }
3114 var adjust_saturation = function(pixels, m) {
3115 pixels.map(function(p) {
3116 var i = (0.3*p[0] + 0.59*p[1] + 0.11*p[2]) * (1-m);
3117 return [p[0]*m + i, p[1]*m + i, p[2]*m + i, p[3]];
3118 });
3119 }
3120 var adjust_brightness = function(pixels, m) {
3121 pixels.map(function(p) {
3122 return [p[0] + m, p[1] + m, p[2] + m, p[3]];

Callers 1

adjustFunction · 0.85

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…