Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
testColorMutation,
`#FFCC00`
);
test(
'should do a simple hex achromatopsia transform',
testColorMutation,
`#D929E2`,
'achromatopsia'
);
test(
'should do a simple named color deuteranopia transform',
testPostCSS,
`.some-color { border: 3px red solid; font-size: 12px }`,
`.some-color { border: 3px ${colorblind.deuteranopia(colorNames.red)} solid; font-size: 12px }`
);
test(
'should do a multi tritanopia transform',
testPostCSS,
`.some-color { border: 3px #D929E2 solid; color: lime }`,
`.some-color { border: 3px ${colorblind.tritanopia('#D929E2')} solid; color: ${colorblind.tritanopia('lime')} }`,
{method: 'tritanopia'}
);
test(
'should work inside gradients',
testPostCSS,
`.some-color { background: linear-gradient(#000000, hsla(120, 30%, 80%, .8)) }`,
`.some-color { background: linear-gradient(#000000, ${onecolor(colorblind.deuteranopia('#bddbbd')).alpha('0.8').cssa()}) }`
);
const isKeyword = function (str) { return keywords.hasOwnProperty(str) }
const isInherit = function (str) { return str === 'inherit' }