Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
rgb: converter.hex.rgb(this.name)
}
case 'HSL':
return {
name: converter.hsl.hex(source.input),
rgb: converter.hsl.rgb(source.input)
}
case 'HSV':
return {
name: converter.hsv.hex(source.input),
rgb: converter.hsv.rgb(source.input)
}
case 'HWB':
return {
name: converter.hwb.hex(source.input),
rgb: converter.hwb.rgb(source.input)
}
case 'SGR':
return {
name: source.input,
rgb: source.input
}
case 'named':
return {
name: converter.keyword.hex(source.input),
rgb: converter.keyword.rgb(source.input)
}
default:
throw new Error(`Unrecognised color space: ${source.space}`)
}
})(this.source)
name: converter.rgb.hex(source.input),
rgb: converter.hex.rgb(this.name)
}
case 'HSL':
return {
name: converter.hsl.hex(source.input),
rgb: converter.hsl.rgb(source.input)
}
case 'HSV':
return {
name: converter.hsv.hex(source.input),
rgb: converter.hsv.rgb(source.input)
}
case 'HWB':
return {
name: converter.hwb.hex(source.input),
rgb: converter.hwb.rgb(source.input)
}
case 'SGR':
return {
name: source.input,
rgb: source.input
}
case 'named':
return {
name: converter.keyword.hex(source.input),
rgb: converter.keyword.rgb(source.input)
}
default:
throw new Error(`Unrecognised color space: ${source.space}`)
}
})(this.source)
rgb: converter.hex.rgb(this.name)
}
case 'HSL':
return {
name: converter.hsl.hex(source.input),
rgb: converter.hsl.rgb(source.input)
}
case 'HSV':
return {
name: converter.hsv.hex(source.input),
rgb: converter.hsv.rgb(source.input)
}
case 'HWB':
return {
name: converter.hwb.hex(source.input),
rgb: converter.hwb.rgb(source.input)
}
case 'SGR':
return {
name: source.input,
rgb: source.input
}
case 'named':
return {
name: converter.keyword.hex(source.input),
rgb: converter.keyword.rgb(source.input)
}
default:
throw new Error(`Unrecognised color space: ${source.space}`)
}
})(this.source)
name: converter.rgb.hex(source.input),
rgb: converter.hex.rgb(this.name)
}
case 'HSL':
return {
name: converter.hsl.hex(source.input),
rgb: converter.hsl.rgb(source.input)
}
case 'HSV':
return {
name: converter.hsv.hex(source.input),
rgb: converter.hsv.rgb(source.input)
}
case 'HWB':
return {
name: converter.hwb.hex(source.input),
rgb: converter.hwb.rgb(source.input)
}
case 'SGR':
return {
name: source.input,
rgb: source.input
}
case 'named':
return {
name: converter.keyword.hex(source.input),
rgb: converter.keyword.rgb(source.input)
}
default:
throw new Error(`Unrecognised color space: ${source.space}`)
}
})(this.source)