@coloroscopy/validation
v0.0.2
Published
Tools to validate color values.
Downloads
2
Readme
@coloroscopy/validation
Validators for color values
Installation
yarn:
yarn add @coloroscopy/validation
npm:
npm install @coloroscopy/validation
Validators:
isCssColorName
Checks if value is css color name
isCssColorName('aqua') // true
isCssColorName('teal') // true
isCssColorName('Pablo') // false
isHexColor
Checks if value is valid hex color
isHexColor('#fa0c85') // true
isHexColor('#c4f') // true
isHexColor('#fa0c85ff') // true
isHexColor('aqua') // false