src/luminosity.js
function shiftLuminosity (hue, shiftAmount, huePoints) {
  if (hue === 360) {
    hue = 0
  }
  const hueShift = nearestHue(hue, huePoints)
  const phi = PHI(hue, hueShift)
  if (phi === 0) {
    return hue
  }
  let newHue
  if (phi > 0) {
    newHue = hue + shiftAmount
  } else {
    newHue = hue - shiftAmount
  }
  return limit(newHue, 0, 360)
}
function shiftLuminosity (hue, shiftAmount, huePoints) {
  if (hue === 360) {
    hue = 0
  }
  const hueShift = nearestHue(hue, huePoints)
  const phi = PHI(hue, hueShift)
  if (phi === 0) {
    return hue
  }
  let newHue
  if (phi > 0) {
    newHue = hue + shiftAmount
  } else {
    newHue = hue - shiftAmount
  }
  return limit(newHue, 0, 360)
}
function shiftLuminosity ( hue , shiftAmount , huePoints ) { if ( hue === 360 ) { hue = 0 } const hueShift = nearestHue ( hue , huePoints ) const phi = PHI ( hue , hueShift ) if ( phi === 0 ) { return hue } let newHue if ( phi > 0 ) { newHue = hue + shiftAmount } else { newHue = hue - shiftAmount } return limit ( newHue , 0 , 360 ) }
Shift perceived luminance towards or away from a specific max hue value
Shift perceived luminance towards or away from a specific max hue value