MCPcopy Create free account
hub / github.com/devforth/painterro / drawAlpher

Method drawAlpher

js/colorPicker.js:317–326  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

315 }
316
317 drawAlpher() {
318 this.ctxAlpha.clearRect(0, 0, this.w, 15);
319 const lightGradient = this.ctxAlpha.createLinearGradient(0, 0, this.w, 0);
320 lightGradient.addColorStop(0, 'rgba(255,255,255,0)');
321 lightGradient.addColorStop(0.05, 'rgba(255,255,255,0)');
322 lightGradient.addColorStop(0.95, this.color);
323 lightGradient.addColorStop(1, this.color);
324 this.ctxAlpha.fillStyle = lightGradient;
325 this.ctxAlpha.fillRect(0, 0, this.w, 15);
326 }
327}

Callers 1

regetColorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected