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

Function lighter

pattern/canvas.js:821–828  ·  view source on GitHub ↗
(clr, step)

Source from the content-addressed store, hash-verified

819}
820
821function lighter(clr, step) {
822 /* Returns a copy of the color with a lighter brightness.
823 */
824 if (step === undefined) step = 0.2;
825 var hsb = _rgb2hsb(clr.r, clr.g, clr.b);
826 var rgb = _hsb2rgb(hsb[0], hsb[1], Math.min(1, hsb[2]+step));
827 return new Color(rgb[0], rgb[1], rgb[2], clr.a);
828}
829
830var darken = darker;
831var lighten = lighter;

Callers

nothing calls this directly

Calls 2

_rgb2hsbFunction · 0.85
_hsb2rgbFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…