hextimator 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 0.14.0
2
+
3
+ ### Minor Changes
4
+
5
+ - [#173](https://github.com/fgrgic/hextimator/pull/173) [`f1fe2ca`](https://github.com/fgrgic/hextimator/commit/f1fe2ca5a922080b7c9c20d87ea43a8279cb0782) Thanks [@fgrgic](https://github.com/fgrgic)! - Adds `foreground-weak` variant as one of the default variants.
6
+
7
+ `foreground-weak` is the weakest contrast color to its background that still satisfies the required contrast ratio (e.g. `AAA`, or 7:1)
8
+
9
+ Not a breaking change, additive only. If you had specific overrides for `foreground-weak`, they will continue working as expected.
10
+
1
11
  ## 0.13.0
2
12
 
3
13
  ### Minor Changes
package/README.md CHANGED
@@ -88,13 +88,15 @@ npx hextimator '#BADA55' --preset bold
88
88
 
89
89
  ## What is in every theme
90
90
 
91
- | Role | Variants |
92
- | -------- | --------------------------------- |
93
- | surface | DEFAULT, strong, weak, foreground |
94
- | accent | DEFAULT, strong, weak, foreground |
95
- | positive | DEFAULT, strong, weak, foreground |
96
- | negative | DEFAULT, strong, weak, foreground |
97
- | caution | DEFAULT, strong, weak, foreground |
91
+ | Role | Variants |
92
+ | -------- | ------------------------------------------------- |
93
+ | surface | DEFAULT, strong, weak, foreground, foreground-weak |
94
+ | accent | DEFAULT, strong, weak, foreground, foreground-weak |
95
+ | positive | DEFAULT, strong, weak, foreground, foreground-weak |
96
+ | negative | DEFAULT, strong, weak, foreground, foreground-weak |
97
+ | caution | DEFAULT, strong, weak, foreground, foreground-weak |
98
+
99
+ `foreground-weak` is the softest foreground that still meets your contrast target against the role's DEFAULT background - use it for secondary or muted text.
98
100
 
99
101
  Plus **`brand-exact`** (your input color, unchanged) and **`brand-exact-foreground`**.
100
102
 
package/fallback.css CHANGED
@@ -3,22 +3,27 @@
3
3
  --surface-strong: #fcfcfc;
4
4
  --surface-weak: #ebebeb;
5
5
  --surface-foreground: #030303;
6
+ --surface-foreground-weak: #525252;
6
7
  --accent: #454545;
7
8
  --accent-strong: #383838;
8
9
  --accent-weak: #525252;
9
10
  --accent-foreground: #f5f5f5;
11
+ --accent-foreground-weak: #dedede;
10
12
  --positive: #454545;
11
13
  --positive-strong: #383838;
12
14
  --positive-weak: #525252;
13
15
  --positive-foreground: #f5f5f5;
16
+ --positive-foreground-weak: #dedede;
14
17
  --negative: #454545;
15
18
  --negative-strong: #383838;
16
19
  --negative-weak: #525252;
17
20
  --negative-foreground: #f5f5f5;
21
+ --negative-foreground-weak: #dedede;
18
22
  --caution: #454545;
19
23
  --caution-strong: #383838;
20
24
  --caution-weak: #525252;
21
25
  --caution-foreground: #f5f5f5;
26
+ --caution-foreground-weak: #dedede;
22
27
  --brand-exact: #737373;
23
28
  --brand-exact-foreground: #f5f5f5;
24
29
  }
@@ -28,22 +33,27 @@
28
33
  --surface-strong: #030303;
29
34
  --surface-weak: #2e2e2e;
30
35
  --surface-foreground: #f5f5f5;
36
+ --surface-foreground-weak: #a3a3a3;
31
37
  --accent: #454545;
32
38
  --accent-strong: #525252;
33
39
  --accent-weak: #2b2b2b;
34
40
  --accent-foreground: #f5f5f5;
41
+ --accent-foreground-weak: #dedede;
35
42
  --positive: #454545;
36
43
  --positive-strong: #525252;
37
44
  --positive-weak: #2b2b2b;
38
45
  --positive-foreground: #f5f5f5;
46
+ --positive-foreground-weak: #dedede;
39
47
  --negative: #454545;
40
48
  --negative-strong: #525252;
41
49
  --negative-weak: #2b2b2b;
42
50
  --negative-foreground: #f5f5f5;
51
+ --negative-foreground-weak: #dedede;
43
52
  --caution: #454545;
44
53
  --caution-strong: #525252;
45
54
  --caution-weak: #2b2b2b;
46
55
  --caution-foreground: #f5f5f5;
56
+ --caution-foreground-weak: #dedede;
47
57
  --brand-exact: #737373;
48
58
  --brand-exact-foreground: #f5f5f5;
49
59
  }
@@ -53,22 +63,27 @@
53
63
  --surface-strong: #030303;
54
64
  --surface-weak: #2e2e2e;
55
65
  --surface-foreground: #f5f5f5;
66
+ --surface-foreground-weak: #a3a3a3;
56
67
  --accent: #454545;
57
68
  --accent-strong: #525252;
58
69
  --accent-weak: #2b2b2b;
59
70
  --accent-foreground: #f5f5f5;
71
+ --accent-foreground-weak: #dedede;
60
72
  --positive: #454545;
61
73
  --positive-strong: #525252;
62
74
  --positive-weak: #2b2b2b;
63
75
  --positive-foreground: #f5f5f5;
76
+ --positive-foreground-weak: #dedede;
64
77
  --negative: #454545;
65
78
  --negative-strong: #525252;
66
79
  --negative-weak: #2b2b2b;
67
80
  --negative-foreground: #f5f5f5;
81
+ --negative-foreground-weak: #dedede;
68
82
  --caution: #454545;
69
83
  --caution-strong: #525252;
70
84
  --caution-weak: #2b2b2b;
71
85
  --caution-foreground: #f5f5f5;
86
+ --caution-foreground-weak: #dedede;
72
87
  --brand-exact: #737373;
73
88
  --brand-exact-foreground: #f5f5f5;
74
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hextimator",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "Runtime theming for multi-tenant apps.",
5
5
  "keywords": [
6
6
  "color-palette",
@@ -3,20 +3,35 @@
3
3
  --color-accent-strong-inverted: var(--accent-strong-inverted);
4
4
  --color-accent-weak-inverted: var(--accent-weak-inverted);
5
5
  --color-accent-foreground-inverted: var(--accent-foreground-inverted);
6
+ --color-accent-foreground-weak-inverted: var(
7
+ --accent-foreground-weak-inverted
8
+ );
6
9
  --color-surface-inverted: var(--surface-inverted);
7
10
  --color-surface-strong-inverted: var(--surface-strong-inverted);
8
11
  --color-surface-weak-inverted: var(--surface-weak-inverted);
9
12
  --color-surface-foreground-inverted: var(--surface-foreground-inverted);
13
+ --color-surface-foreground-weak-inverted: var(
14
+ --surface-foreground-weak-inverted
15
+ );
10
16
  --color-positive-inverted: var(--positive-inverted);
11
17
  --color-positive-strong-inverted: var(--positive-strong-inverted);
12
18
  --color-positive-weak-inverted: var(--positive-weak-inverted);
13
19
  --color-positive-foreground-inverted: var(--positive-foreground-inverted);
20
+ --color-positive-foreground-weak-inverted: var(
21
+ --positive-foreground-weak-inverted
22
+ );
14
23
  --color-negative-inverted: var(--negative-inverted);
15
24
  --color-negative-strong-inverted: var(--negative-strong-inverted);
16
25
  --color-negative-weak-inverted: var(--negative-weak-inverted);
17
26
  --color-negative-foreground-inverted: var(--negative-foreground-inverted);
27
+ --color-negative-foreground-weak-inverted: var(
28
+ --negative-foreground-weak-inverted
29
+ );
18
30
  --color-caution-inverted: var(--caution-inverted);
19
31
  --color-caution-strong-inverted: var(--caution-strong-inverted);
20
32
  --color-caution-weak-inverted: var(--caution-weak-inverted);
21
33
  --color-caution-foreground-inverted: var(--caution-foreground-inverted);
34
+ --color-caution-foreground-weak-inverted: var(
35
+ --caution-foreground-weak-inverted
36
+ );
22
37
  }
package/tailwind.css CHANGED
@@ -3,22 +3,27 @@
3
3
  --color-accent-strong: var(--accent-strong);
4
4
  --color-accent-weak: var(--accent-weak);
5
5
  --color-accent-foreground: var(--accent-foreground);
6
+ --color-accent-foreground-weak: var(--accent-foreground-weak);
6
7
  --color-surface: var(--surface);
7
8
  --color-surface-strong: var(--surface-strong);
8
9
  --color-surface-weak: var(--surface-weak);
9
10
  --color-surface-foreground: var(--surface-foreground);
11
+ --color-surface-foreground-weak: var(--surface-foreground-weak);
10
12
  --color-positive: var(--positive);
11
13
  --color-positive-strong: var(--positive-strong);
12
14
  --color-positive-weak: var(--positive-weak);
13
15
  --color-positive-foreground: var(--positive-foreground);
16
+ --color-positive-foreground-weak: var(--positive-foreground-weak);
14
17
  --color-negative: var(--negative);
15
18
  --color-negative-strong: var(--negative-strong);
16
19
  --color-negative-weak: var(--negative-weak);
17
20
  --color-negative-foreground: var(--negative-foreground);
21
+ --color-negative-foreground-weak: var(--negative-foreground-weak);
18
22
  --color-caution: var(--caution);
19
23
  --color-caution-strong: var(--caution-strong);
20
24
  --color-caution-weak: var(--caution-weak);
21
25
  --color-caution-foreground: var(--caution-foreground);
26
+ --color-caution-foreground-weak: var(--caution-foreground-weak);
22
27
  --color-brand-exact: var(--brand-exact);
23
28
  --color-brand-exact-foreground: var(--brand-exact-foreground);
24
29
  }