Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Oct 14, 2019
1 parent bea6380 commit 22bebe7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions js/util/Color.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,15 +396,14 @@ define( require => {
lightness = clamp( lightness / 100, 0, 1 ); // percentage

// see http://www.w3.org/TR/css3-color/
let m1;
let m2;
if ( lightness < 0.5 ) {
m2 = lightness * ( saturation + 1 );
}
else {
m2 = lightness + saturation - lightness * saturation;
}
m1 = lightness * 2 - m2;
const m1 = lightness * 2 - m2;

this.r = Util.roundSymmetric( Color.hueToRGB( m1, m2, hue + 1 / 3 ) * 255 );
this.g = Util.roundSymmetric( Color.hueToRGB( m1, m2, hue ) * 255 );
Expand Down

0 comments on commit 22bebe7

Please sign in to comment.