1 | # color-no-hex
|
2 |
|
3 | Disallow hex colors.
|
4 |
|
5 |
|
6 | ```css
|
7 | a { color: #333 }
|
8 | /** ↑
|
9 | * This hex color */
|
10 | ```
|
11 |
|
12 | ## Options
|
13 |
|
14 | ### `true`
|
15 |
|
16 | The following patterns are considered violations:
|
17 |
|
18 |
|
19 | ```css
|
20 | a { color: #000; }
|
21 | ```
|
22 |
|
23 |
|
24 | ```css
|
25 | a { color: #fff1aa; }
|
26 | ```
|
27 |
|
28 |
|
29 | ```css
|
30 | a { color: #123456aa; }
|
31 | ```
|
32 |
|
33 | Hex values that are not valid also cause violations:
|
34 |
|
35 |
|
36 | ```css
|
37 | a { color: #foobar; }
|
38 | ```
|
39 |
|
40 |
|
41 | ```css
|
42 | a { color: #0000000000000000; }
|
43 | ```
|
44 |
|
45 | The following patterns are _not_ considered violations:
|
46 |
|
47 |
|
48 | ```css
|
49 | a { color: black; }
|
50 | ```
|
51 |
|
52 |
|
53 | ```css
|
54 | a { color: rgb(0, 0, 0); }
|
55 | ```
|
56 |
|
57 |
|
58 | ```css
|
59 | a { color: rgba(0, 0, 0, 1); }
|
60 | ```
|