Skip to content

css/no-invalid-color-hex

disallow invalid hex colors

  • ⚙️ This rule is included in "plugin:css/recommended" and "plugin:css/standard".

📖 Rule Details

This rule reports an invalid color hex.
Longhand hex colors can be either 6 or 8 (with alpha channel) hexadecimal characters. And their shorthand variants are 3 and 4 characters respectively.

This rule was inspired by Stylelint's color-no-invalid-hex rule.

Now loading...

🔧 Options

Nothing.

📚 Further reading

🚀 Version

This rule was introduced in eslint-plugin-css v0.2.0

🔍 Implementation