Skip to content

Commit

Permalink
Check for degamma enabled before applying (porsager#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesper Grann Laursen committed Mar 24, 2022
1 parent c864b56 commit 9e9e739
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/busylight.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,10 @@ Busylight.prototype.send = function(p){

if(p && p.color !== undefined) {
p.color = p.color || this._defaults.color;
this.buffer[positions.red] = degamma(p.color[0]);
this.buffer[positions.green] = degamma(p.color[1]);
this.buffer[positions.blue] = degamma(p.color[2]);
if (this.degamma || this._defaults.degamma) p.color = p.color.map(degamma)
this.buffer[positions.red] = p.color[0];
this.buffer[positions.green] = p.color[1];
this.buffer[positions.blue] = p.color[2];
}

if(p && p.tone === false)
Expand Down

0 comments on commit 9e9e739

Please sign in to comment.