3 Require (where possible) or disallow named colors.
8 * These named colors */
13 `string`: `"always-where-possible"|"never"`
15 ### `"always-where-possible"`
17 Colors *must always*, where possible, be named.
19 This will complain if a hex (3, 4, 6 and 8 digit), `rgb()`, `rgba()`, `hsl()`, `hsla()`, `hwb()` or `gray()` color can be represented as a named color.
21 The following patterns are considered violations:
32 a { color: #ff000000; }
36 a { color: rgb(0, 0, 0); }
40 a { color: rgb(0%, 0%, 0%); }
44 a { color: rgba(0, 0, 0, 0); }
48 a { color: hsl(0, 0%, 0%); }
52 a { color: hwb(0, 0%, 100%); }
59 The following patterns are *not* considered violations:
66 a { color: rgb(10, 0, 0); }
70 a { color: rgb(0, 0, 0, 0.5); }
75 Colors *must never* be named.
77 The following patterns are considered violations:
87 The following patterns are *not* considered violations:
94 a { color: rgb(0, 0, 0); }
98 a { color: var(--white); }
109 ## Optional secondary options
111 ### `ignore: ["inside-function"]`
113 Ignore colors that are inside a function.
115 For example, with `"never"`.
117 The following patterns are *not* considered violations:
121 color: map-get($colour, blue);
127 background-image: url(red);
131 ### `ignoreProperties: ["/regex/", "string"]`
133 For example with `"never"`.
138 ["/^my-/", "composes"]
141 The following patterns are *not* considered violations:
151 my-other-property: red;
157 composes: red from './index.css';