Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function Pigment({ hex, name, onCopyHex, justCopied }: Props & ColorData) {
const inline: ViewStyle = { backgroundColor: hex }
const cmyk = new ColorTranslator(hex).CMYK.toUpperCase()
.replace(/%/g, '')
.replace('K(', 'K (')
if (hex === colors.white) {
inline.borderColor = colors.gray
inline.borderWidth = 1
}
const foreGround = getContrastingColor(hex) as colors
return (