Skip to content

Add isColor to validate CSS compatible color formats #5

Description

@Manu-2717

Validator Request: isColor
Add a color validator that is compatible with the css standard. This includes the main cases as well as the edge cases where the color format would work. This would help validate colors for use in web applications, such as when storing user selected color in a database. isColor is meant to support all css color formats - that is - if it works in css it would be validated. This includes:

hex
hexa
rgb
rgba
hsl
hsla
You could validate your color against all color formats or a particular color format.
Predefined color names such as 'red' or 'blue' are not supported under this validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions