lib/devices/custom.js
function calculateLuminance(hex, lum) {
  return Math.round(Math.min(Math.max(0, hex + (hex * lum)), 255));
}
function calculateLuminance(hex, lum) {
  return Math.round(Math.min(Math.max(0, hex + (hex * lum)), 255));
}
function calculateLuminance ( hex , lum ) { return Math . round ( Math . min ( Math . max ( 0 , hex + ( hex * lum ) ) , 255 ) ) ; }
Converts a hex color number to luminance adjusted value

@private
@param {Object} hex hex color value to convert
@param {Number} lum percentage of luminance
@return {Object} converted color value
Converts a hex color number to luminance adjusted value