Skip to content

Commit

Permalink
style(hslToRgb): Fix typo and remove comment
Browse files Browse the repository at this point in the history
  • Loading branch information
davidde committed May 18, 2019
1 parent 1662a30 commit 9b4f594
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/internalHelpers/_hslToRgb.js
Expand Up @@ -21,8 +21,8 @@ function hslToRgb(
return convert(lightness, lightness, lightness)
}

// formular from https://en.wikipedia.org/wiki/HSL_and_HSV
const huePrime = (((hue % 360) + 360) % 360) / 60 // Corrected for potential negative hue
// formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
const huePrime = (((hue % 360) + 360) % 360) / 60
const chroma = (1 - Math.abs(2 * lightness - 1)) * saturation
const secondComponent = chroma * (1 - Math.abs((huePrime % 2) - 1))

Expand Down

0 comments on commit 9b4f594

Please sign in to comment.