@primer/primitives 11.4.1-rc.eb8ee149 → 11.5.0-rc.14eaeb12

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.
Files changed (190) hide show
  1. package/DESIGN_TOKENS_GUIDE.md +185 -0
  2. package/DESIGN_TOKENS_SPEC.md +136 -8
  3. package/dist/build/formats/jsonFigma.js +8 -1
  4. package/dist/build/formats/markdownLlmGuidelines.js +349 -0
  5. package/dist/build/schemas/borderToken.d.ts +61 -5
  6. package/dist/build/schemas/borderToken.js +2 -1
  7. package/dist/build/schemas/colorToken.d.ts +639 -30
  8. package/dist/build/schemas/colorToken.js +3 -2
  9. package/dist/build/schemas/colorW3cValue.d.ts +28 -0
  10. package/dist/build/schemas/colorW3cValue.js +42 -0
  11. package/dist/build/schemas/cubicBezierToken.d.ts +1 -1
  12. package/dist/build/schemas/dimensionToken.d.ts +9 -2
  13. package/dist/build/schemas/dimensionValue.d.ts +12 -1
  14. package/dist/build/schemas/dimensionValue.js +10 -13
  15. package/dist/build/schemas/durationToken.d.ts +8 -2
  16. package/dist/build/schemas/durationValue.d.ts +11 -1
  17. package/dist/build/schemas/durationValue.js +13 -3
  18. package/dist/build/schemas/fontFamilyToken.d.ts +1 -1
  19. package/dist/build/schemas/fontWeightToken.d.ts +1 -1
  20. package/dist/build/schemas/gradientToken.d.ts +23 -2
  21. package/dist/build/schemas/gradientToken.js +2 -1
  22. package/dist/build/schemas/numberToken.d.ts +1 -1
  23. package/dist/build/schemas/shadowToken.d.ts +1751 -127
  24. package/dist/build/schemas/shadowToken.js +8 -2
  25. package/dist/build/schemas/stringToken.d.ts +1 -1
  26. package/dist/build/schemas/stringToken.js +1 -1
  27. package/dist/build/schemas/tokenType.d.ts +1 -1
  28. package/dist/build/schemas/transitionToken.d.ts +15 -3
  29. package/dist/build/schemas/typographyToken.d.ts +19 -5
  30. package/dist/build/schemas/typographyToken.js +1 -1
  31. package/dist/build/schemas/validTokenType.d.ts +1 -1
  32. package/dist/build/schemas/validTokenType.js +1 -1
  33. package/dist/build/schemas/viewportRangeToken.d.ts +1 -1
  34. package/dist/build/transformers/borderToCss.js +19 -1
  35. package/dist/build/transformers/colorAlphaToCss.js +6 -3
  36. package/dist/build/transformers/colorToHex.js +5 -2
  37. package/dist/build/transformers/colorToRgbAlpha.js +5 -2
  38. package/dist/build/transformers/colorToRgbaFloat.js +5 -0
  39. package/dist/build/transformers/dimensionToPixelUnitless.d.ts +3 -2
  40. package/dist/build/transformers/dimensionToPixelUnitless.js +22 -26
  41. package/dist/build/transformers/dimensionToRem.d.ts +2 -1
  42. package/dist/build/transformers/dimensionToRem.js +21 -22
  43. package/dist/build/transformers/dimensionToRemPxArray.d.ts +2 -1
  44. package/dist/build/transformers/dimensionToRemPxArray.js +21 -22
  45. package/dist/build/transformers/durationToCss.d.ts +2 -1
  46. package/dist/build/transformers/durationToCss.js +19 -12
  47. package/dist/build/transformers/gradientToCss.js +2 -1
  48. package/dist/build/transformers/shadowToCss.js +15 -1
  49. package/dist/build/transformers/utilities/normalizeColorValue.d.ts +23 -0
  50. package/dist/build/transformers/utilities/normalizeColorValue.js +74 -0
  51. package/dist/build/transformers/utilities/parseDimension.d.ts +12 -0
  52. package/dist/build/transformers/utilities/parseDimension.js +31 -0
  53. package/dist/build/types/borderTokenValue.d.ts +5 -2
  54. package/dist/build/types/dimensionTokenValue.d.ts +9 -0
  55. package/dist/build/types/shadowTokenValue.d.ts +8 -5
  56. package/dist/css/base/motion/motion.css +1 -1
  57. package/dist/css/functional/size/radius.css +1 -1
  58. package/dist/css/functional/size/size-coarse.css +1 -0
  59. package/dist/css/functional/size/size-fine.css +1 -0
  60. package/dist/css/functional/size/size.css +5 -0
  61. package/dist/css/functional/themes/dark-colorblind-high-contrast.css +42 -30
  62. package/dist/css/functional/themes/dark-colorblind.css +42 -30
  63. package/dist/css/functional/themes/dark-dimmed-high-contrast.css +42 -30
  64. package/dist/css/functional/themes/dark-dimmed.css +42 -30
  65. package/dist/css/functional/themes/dark-high-contrast.css +42 -30
  66. package/dist/css/functional/themes/dark-tritanopia-high-contrast.css +42 -30
  67. package/dist/css/functional/themes/dark-tritanopia.css +42 -30
  68. package/dist/css/functional/themes/dark.css +42 -30
  69. package/dist/css/functional/themes/light-colorblind-high-contrast.css +42 -30
  70. package/dist/css/functional/themes/light-colorblind.css +42 -30
  71. package/dist/css/functional/themes/light-high-contrast.css +42 -30
  72. package/dist/css/functional/themes/light-tritanopia-high-contrast.css +42 -30
  73. package/dist/css/functional/themes/light-tritanopia.css +42 -30
  74. package/dist/css/functional/themes/light.css +42 -30
  75. package/dist/docs/base/motion/motion.json +96 -24
  76. package/dist/docs/base/size/size.json +76 -19
  77. package/dist/docs/base/typography/typography.json +24 -6
  78. package/dist/docs/functional/size/border.json +26 -11
  79. package/dist/docs/functional/size/breakpoints.json +24 -6
  80. package/dist/docs/functional/size/radius.json +18 -6
  81. package/dist/docs/functional/size/size-coarse.json +55 -2
  82. package/dist/docs/functional/size/size-fine.json +55 -2
  83. package/dist/docs/functional/size/size.json +195 -15
  84. package/dist/docs/functional/themes/dark-colorblind-high-contrast.json +3921 -714
  85. package/dist/docs/functional/themes/dark-colorblind.json +3911 -712
  86. package/dist/docs/functional/themes/dark-dimmed-high-contrast.json +3774 -547
  87. package/dist/docs/functional/themes/dark-dimmed.json +3801 -554
  88. package/dist/docs/functional/themes/dark-high-contrast.json +3926 -715
  89. package/dist/docs/functional/themes/dark-tritanopia-high-contrast.json +3936 -717
  90. package/dist/docs/functional/themes/dark-tritanopia.json +3769 -546
  91. package/dist/docs/functional/themes/dark.json +3920 -713
  92. package/dist/docs/functional/themes/light-colorblind-high-contrast.json +3780 -553
  93. package/dist/docs/functional/themes/light-colorblind.json +3767 -548
  94. package/dist/docs/functional/themes/light-high-contrast.json +3785 -554
  95. package/dist/docs/functional/themes/light-tritanopia-high-contrast.json +3785 -554
  96. package/dist/docs/functional/themes/light-tritanopia.json +3777 -550
  97. package/dist/docs/functional/themes/light.json +3782 -551
  98. package/dist/docs/functional/typography/typography.json +8 -2
  99. package/dist/fallbacks/base/motion/motion.json +48 -12
  100. package/dist/fallbacks/functional/size/size-coarse.json +2 -1
  101. package/dist/fallbacks/functional/size/size-fine.json +2 -1
  102. package/dist/fallbacks/functional/size/size.json +5 -0
  103. package/dist/figma/dimension/dimension.json +56 -1
  104. package/dist/figma/themes/dark-colorblind.json +49 -1
  105. package/dist/figma/themes/dark-dimmed.json +51 -3
  106. package/dist/figma/themes/dark-high-contrast.json +49 -1
  107. package/dist/figma/themes/dark-tritanopia.json +49 -1
  108. package/dist/figma/themes/dark.json +49 -1
  109. package/dist/figma/themes/light-colorblind.json +53 -5
  110. package/dist/figma/themes/light-high-contrast.json +53 -5
  111. package/dist/figma/themes/light-tritanopia.json +53 -5
  112. package/dist/figma/themes/light.json +53 -5
  113. package/dist/internalCss/dark-colorblind-high-contrast.css +42 -30
  114. package/dist/internalCss/dark-colorblind.css +42 -30
  115. package/dist/internalCss/dark-dimmed-high-contrast.css +42 -30
  116. package/dist/internalCss/dark-dimmed.css +42 -30
  117. package/dist/internalCss/dark-high-contrast.css +42 -30
  118. package/dist/internalCss/dark-tritanopia-high-contrast.css +42 -30
  119. package/dist/internalCss/dark-tritanopia.css +42 -30
  120. package/dist/internalCss/dark.css +42 -30
  121. package/dist/internalCss/light-colorblind-high-contrast.css +42 -30
  122. package/dist/internalCss/light-colorblind.css +42 -30
  123. package/dist/internalCss/light-high-contrast.css +42 -30
  124. package/dist/internalCss/light-tritanopia-high-contrast.css +42 -30
  125. package/dist/internalCss/light-tritanopia.css +42 -30
  126. package/dist/internalCss/light.css +42 -30
  127. package/dist/styleLint/base/motion/motion.json +96 -24
  128. package/dist/styleLint/base/size/size.json +76 -19
  129. package/dist/styleLint/base/typography/typography.json +30 -12
  130. package/dist/styleLint/functional/size/border.json +27 -12
  131. package/dist/styleLint/functional/size/breakpoints.json +24 -6
  132. package/dist/styleLint/functional/size/radius.json +19 -7
  133. package/dist/styleLint/functional/size/size-coarse.json +60 -7
  134. package/dist/styleLint/functional/size/size-fine.json +60 -7
  135. package/dist/styleLint/functional/size/size.json +246 -66
  136. package/dist/styleLint/functional/themes/dark-colorblind-high-contrast.json +4060 -733
  137. package/dist/styleLint/functional/themes/dark-colorblind.json +4050 -731
  138. package/dist/styleLint/functional/themes/dark-dimmed-high-contrast.json +3914 -567
  139. package/dist/styleLint/functional/themes/dark-dimmed.json +3941 -574
  140. package/dist/styleLint/functional/themes/dark-high-contrast.json +4065 -734
  141. package/dist/styleLint/functional/themes/dark-tritanopia-high-contrast.json +4075 -736
  142. package/dist/styleLint/functional/themes/dark-tritanopia.json +4079 -736
  143. package/dist/styleLint/functional/themes/dark.json +4059 -732
  144. package/dist/styleLint/functional/themes/light-colorblind-high-contrast.json +4091 -744
  145. package/dist/styleLint/functional/themes/light-colorblind.json +4078 -739
  146. package/dist/styleLint/functional/themes/light-high-contrast.json +4096 -745
  147. package/dist/styleLint/functional/themes/light-tritanopia-high-contrast.json +4096 -745
  148. package/dist/styleLint/functional/themes/light-tritanopia.json +4088 -741
  149. package/dist/styleLint/functional/themes/light.json +4093 -742
  150. package/dist/styleLint/functional/typography/typography.json +28 -22
  151. package/package.json +5 -4
  152. package/src/tokens/base/color/dark/dark.dimmed.json5 +405 -81
  153. package/src/tokens/base/color/dark/dark.high-contrast.json5 +405 -81
  154. package/src/tokens/base/color/dark/dark.json5 +475 -95
  155. package/src/tokens/base/color/dark/display-dark.json5 +960 -192
  156. package/src/tokens/base/color/light/display-light.json5 +960 -192
  157. package/src/tokens/base/color/light/light.high-contrast.json5 +405 -81
  158. package/src/tokens/base/color/light/light.json5 +475 -95
  159. package/src/tokens/base/motion/timing.json5 +12 -12
  160. package/src/tokens/base/size/size.json5 +194 -194
  161. package/src/tokens/base/typography/typography.json5 +6 -6
  162. package/src/tokens/component/avatar.json5 +72 -44
  163. package/src/tokens/component/button.json5 +1846 -1191
  164. package/src/tokens/component/reactionButton.json5 +20 -4
  165. package/src/tokens/functional/border/border.json5 +33 -2
  166. package/src/tokens/functional/color/bgColor.json5 +18 -2
  167. package/src/tokens/functional/color/borderColor.json5 +8 -1
  168. package/src/tokens/functional/color/control.json5 +160 -32
  169. package/src/tokens/functional/color/display.json5 +7 -0
  170. package/src/tokens/functional/color/fgColor.json5 +13 -1
  171. package/src/tokens/functional/color/syntax.json5 +24 -2
  172. package/src/tokens/functional/shadow/shadow.json5 +1254 -163
  173. package/src/tokens/functional/size/border.json5 +8 -8
  174. package/src/tokens/functional/size/breakpoints.json5 +6 -6
  175. package/src/tokens/functional/size/radius.json5 +5 -5
  176. package/src/tokens/functional/size/size-coarse.json5 +15 -0
  177. package/src/tokens/functional/size/size-fine.json5 +15 -0
  178. package/src/tokens/functional/size/size.json5 +65 -15
  179. package/src/tokens/functional/typography/typography.json5 +8 -4
  180. package/dist/build/parsers/index.d.ts +0 -1
  181. package/dist/build/parsers/index.js +0 -1
  182. package/dist/build/parsers/w3cJsonParser.d.ts +0 -6
  183. package/dist/build/parsers/w3cJsonParser.js +0 -25
  184. package/dist/removed/testing.json5 +0 -4
  185. package/guidelines/color.llm.md +0 -16
  186. package/guidelines/guidelines.llm.md +0 -34
  187. package/guidelines/motion.llm.md +0 -41
  188. package/guidelines/spacing.llm.md +0 -20
  189. package/guidelines/typography.llm.md +0 -14
  190. package/src/tokens/removed/testing.json5 +0 -4
@@ -20,7 +20,11 @@
20
20
  },
21
21
  },
22
22
  hover: {
23
- $value: '#caecff',
23
+ $value: {
24
+ colorSpace: 'hsl',
25
+ components: [201.5, 100, 89.6],
26
+ hex: '#caecff',
27
+ },
24
28
  $type: 'color',
25
29
  $extensions: {
26
30
  'org.primer.figma': {
@@ -30,16 +34,28 @@
30
34
  },
31
35
  'org.primer.overrides': {
32
36
  dark: {
33
- $value: '#3a8cfd',
37
+ $value: {
38
+ colorSpace: 'hsl',
39
+ components: [214.8, 98, 61],
40
+ hex: '#3a8cfd',
41
+ },
34
42
  alpha: 0.36,
35
43
  },
36
44
  'dark-dimmed': {
37
- $value: '#4285e5',
45
+ $value: {
46
+ colorSpace: 'hsl',
47
+ components: [215.3, 75.8, 57.8],
48
+ hex: '#4285e5',
49
+ },
38
50
  alpha: 0.36,
39
51
  },
40
52
  'light-high-contrast': '#c7e9ff',
41
53
  'dark-high-contrast': {
42
- $value: '#5dadff',
54
+ $value: {
55
+ colorSpace: 'hsl',
56
+ components: [210.4, 100, 68.2],
57
+ hex: '#5dadff',
58
+ },
43
59
  alpha: 0.36,
44
60
  },
45
61
  },
@@ -4,7 +4,10 @@
4
4
  $value: {
5
5
  color: '{focus.outlineColor}',
6
6
  style: 'solid',
7
- width: '2px',
7
+ width: {
8
+ value: 2,
9
+ unit: 'px',
10
+ },
8
11
  },
9
12
  $type: 'border',
10
13
  $description: 'Focus ring outline for keyboard navigation and accessibility.',
@@ -21,7 +24,7 @@
21
24
  $extensions: {
22
25
  'org.primer.llm': {
23
26
  usage: ['container-border', 'card-border', 'divider', 'input-border', 'panel-border'],
24
- rules: 'Use default for standard container borders. Use muted for subtle dividers and low-emphasis boundaries. Use emphasis when borders need to stand out. Match status border colors to their semantic meaning (danger for errors, success for positive states). Use disabled only for non-interactive or disabled elements. Prefer semantic variants (open/closed, done) over raw color variants when the context matches.',
27
+ rules: 'These are COMPOSITE border shorthand tokens that resolve to CSS shorthand values like "1px solid #color". Use for the CSS `border` property. Do NOT use for `border-color` — use borderColor.* tokens instead. Every border.* token includes width, style, AND color. Use default for standard container borders. Use muted for subtle dividers and low-emphasis boundaries. Use emphasis when borders need to stand out. Match status border colors to their semantic meaning (danger for errors, success for positive states). Use disabled only for non-interactive or disabled elements. Prefer semantic variants (open/closed, done) over raw color variants when the context matches.',
25
28
  },
26
29
  },
27
30
  default: {
@@ -64,6 +67,15 @@
64
67
  },
65
68
  $type: 'border',
66
69
  },
70
+ translucent: {
71
+ $description: 'Semi-transparent border shorthand for overlays and layered elements. Border-specific token — no bgColor-translucent counterpart exists by design.',
72
+ $value: {
73
+ color: '{borderColor.translucent}',
74
+ style: 'solid',
75
+ width: '{borderWidth.default}',
76
+ },
77
+ $type: 'border',
78
+ },
67
79
  neutral: {
68
80
  $description: 'Neutral gray borders for non-semantic boundaries and subtle UI separation.',
69
81
  emphasis: {
@@ -162,6 +174,25 @@
162
174
  $type: 'border',
163
175
  },
164
176
  },
177
+ draft: {
178
+ $description: 'Borders for draft/WIP state indicators. Use for draft pull requests and unpublished items.',
179
+ emphasis: {
180
+ $value: {
181
+ color: '{borderColor.draft.emphasis}',
182
+ style: 'solid',
183
+ width: '{borderWidth.default}',
184
+ },
185
+ $type: 'border',
186
+ },
187
+ muted: {
188
+ $value: {
189
+ color: '{borderColor.draft.muted}',
190
+ style: 'solid',
191
+ width: '{borderWidth.default}',
192
+ },
193
+ $type: 'border',
194
+ },
195
+ },
165
196
  attention: {
166
197
  $description: 'Yellow borders for warnings, caution states, and items requiring user attention.',
167
198
  emphasis: {
@@ -138,6 +138,10 @@
138
138
  'org.primer.overrides': {
139
139
  dark: '{base.color.neutral.13}',
140
140
  },
141
+ 'org.primer.llm': {
142
+ doNotUse: true,
143
+ rules: 'Avoid using raw white. Use semantic alternatives: bgColor.default for standard backgrounds, bgColor.inset for recessed areas, or bgColor.inverse for inverted contexts. Raw black/white ignore theme preferences and accessibility settings.',
144
+ },
141
145
  },
142
146
  },
143
147
  black: {
@@ -153,6 +157,10 @@
153
157
  'org.primer.overrides': {
154
158
  dark: '{base.color.neutral.0}',
155
159
  },
160
+ 'org.primer.llm': {
161
+ doNotUse: true,
162
+ rules: 'Avoid using raw black. Use semantic alternatives: bgColor.emphasis for dark backgrounds, bgColor.inverse for inverted contexts. Raw black/white ignore theme preferences and accessibility settings.',
163
+ },
156
164
  },
157
165
  },
158
166
  disabled: {
@@ -362,7 +370,11 @@
362
370
  },
363
371
  },
364
372
  emphasis: {
365
- $value: '#1f883d',
373
+ $value: {
374
+ colorSpace: 'hsl',
375
+ components: [137.1, 62.9, 32.7],
376
+ hex: '#1f883d',
377
+ },
366
378
  $type: 'color',
367
379
  $description: 'Strong success background for prominent positive actions',
368
380
  $extensions: {
@@ -879,7 +891,11 @@
879
891
  alpha: 0.1,
880
892
  },
881
893
  'dark-tritanopia': {
882
- $value: '#db61a2',
894
+ $value: {
895
+ colorSpace: 'hsl',
896
+ components: [328, 62.9, 62],
897
+ hex: '#db61a2',
898
+ },
883
899
  alpha: 0.1,
884
900
  },
885
901
  },
@@ -1,5 +1,12 @@
1
1
  {
2
2
  borderColor: {
3
+ $description: 'Border color tokens that resolve to a single color value (e.g. #cf222e). For composite border shorthand (color + style + width), use border.* tokens instead.',
4
+ $extensions: {
5
+ 'org.primer.llm': {
6
+ usage: ['border-color', 'border-styling'],
7
+ rules: 'These are COLOR-ONLY tokens (resolve to a hex value like #cf222e). Use for the CSS `border-color` property. Do NOT use for the CSS `border` shorthand — use border.* tokens instead.',
8
+ },
9
+ },
3
10
  default: {
4
11
  $value: '{base.color.neutral.6}',
5
12
  $type: 'color',
@@ -163,7 +170,7 @@
163
170
  translucent: {
164
171
  $value: '{base.color.neutral.13}',
165
172
  $type: 'color',
166
- $description: 'Semi-transparent border for overlays and layered elements',
173
+ $description: 'Semi-transparent border for overlays and layered elements. Border-specific token — no bgColor-translucent counterpart exists by design.',
167
174
  $extensions: {
168
175
  'org.primer.figma': {
169
176
  collection: 'mode',
@@ -229,7 +229,11 @@
229
229
  'org.primer.overrides': {
230
230
  dark: '{borderColor.default}',
231
231
  'dark-dimmed': {
232
- $value: '#3d444d',
232
+ $value: {
233
+ colorSpace: 'hsl',
234
+ components: [213.8, 11.6, 27.1],
235
+ hex: '#3d444d',
236
+ },
233
237
  },
234
238
  },
235
239
  },
@@ -732,25 +736,45 @@
732
736
  alpha: 0.4,
733
737
  },
734
738
  'dark-high-contrast': {
735
- $value: '#c51120',
739
+ $value: {
740
+ colorSpace: 'hsl',
741
+ components: [355, 84.1, 42],
742
+ hex: '#c51120',
743
+ },
736
744
  alpha: 1,
737
745
  },
738
746
  'dark-dimmed-high-contrast': {
739
- $value: '#c51120',
747
+ $value: {
748
+ colorSpace: 'hsl',
749
+ components: [355, 84.1, 42],
750
+ hex: '#c51120',
751
+ },
740
752
  alpha: 1,
741
753
  },
742
754
  'dark-tritanopia-high-contrast': {
743
- $value: '#c51120',
755
+ $value: {
756
+ colorSpace: 'hsl',
757
+ components: [355, 84.1, 42],
758
+ hex: '#c51120',
759
+ },
744
760
  alpha: 1,
745
761
  },
746
762
  'dark-protanopia-deuteranopia-high-contrast': {
747
763
  $value: '{bgColor.danger.emphasis}',
748
764
  },
749
765
  'light-high-contrast': {
750
- $value: '#8c0b1d',
766
+ $value: {
767
+ colorSpace: 'hsl',
768
+ components: [351.6, 85.4, 29.6],
769
+ hex: '#8c0b1d',
770
+ },
751
771
  },
752
772
  'light-tritanopia-high-contrast': {
753
- $value: '#8c0b1d',
773
+ $value: {
774
+ colorSpace: 'hsl',
775
+ components: [351.6, 85.4, 29.6],
776
+ hex: '#8c0b1d',
777
+ },
754
778
  },
755
779
  'light-protanopia-deuteranopia-high-contrast': {
756
780
  $value: '{base.color.orange.6}',
@@ -778,7 +802,11 @@
778
802
  },
779
803
  },
780
804
  hover: {
781
- $value: '#0860ca',
805
+ $value: {
806
+ colorSpace: 'hsl',
807
+ components: [212.8, 92.4, 41.2],
808
+ hex: '#0860ca',
809
+ },
782
810
  $type: 'color',
783
811
  $extensions: {
784
812
  'org.primer.figma': {
@@ -789,34 +817,70 @@
789
817
  'org.primer.overrides': {
790
818
  dark: '#2A7AEF',
791
819
  'dark-high-contrast': {
792
- $value: '#2b64c1',
820
+ $value: {
821
+ colorSpace: 'hsl',
822
+ components: [217.2, 63.6, 46.3],
823
+ hex: '#2b64c1',
824
+ },
793
825
  },
794
826
  'dark-tritanopia-high-contrast': {
795
- $value: '#2b64c1',
827
+ $value: {
828
+ colorSpace: 'hsl',
829
+ components: [217.2, 63.6, 46.3],
830
+ hex: '#2b64c1',
831
+ },
796
832
  },
797
833
  'dark-protanopia-deuteranopia-high-contrast': {
798
- $value: '#2b64c1',
834
+ $value: {
835
+ colorSpace: 'hsl',
836
+ components: [217.2, 63.6, 46.3],
837
+ hex: '#2b64c1',
838
+ },
799
839
  },
800
840
  'dark-dimmed': {
801
- $value: '#3876d3',
841
+ $value: {
842
+ colorSpace: 'hsl',
843
+ components: [216, 63.8, 52.4],
844
+ hex: '#3876d3',
845
+ },
802
846
  },
803
847
  'dark-dimmed-high-contrast': {
804
- $value: '#2b64c1',
848
+ $value: {
849
+ colorSpace: 'hsl',
850
+ components: [217.2, 63.6, 46.3],
851
+ hex: '#2b64c1',
852
+ },
805
853
  },
806
854
  'light-high-contrast': {
807
- $value: '#0344a8',
855
+ $value: {
856
+ colorSpace: 'hsl',
857
+ components: [216.4, 96.5, 33.5],
858
+ hex: '#0344a8',
859
+ },
808
860
  },
809
861
  'light-tritanopia-high-contrast': {
810
- $value: '#0344a8',
862
+ $value: {
863
+ colorSpace: 'hsl',
864
+ components: [216.4, 96.5, 33.5],
865
+ hex: '#0344a8',
866
+ },
811
867
  },
812
868
  'light-protanopia-deuteranopia-high-contrast': {
813
- $value: '#0344a8',
869
+ $value: {
870
+ colorSpace: 'hsl',
871
+ components: [216.4, 96.5, 33.5],
872
+ hex: '#0344a8',
873
+ },
814
874
  },
815
875
  },
816
876
  },
817
877
  },
818
878
  active: {
819
- $value: '#0757ba',
879
+ $value: {
880
+ colorSpace: 'hsl',
881
+ components: [213.2, 92.7, 37.8],
882
+ hex: '#0757ba',
883
+ },
820
884
  $type: 'color',
821
885
  $extensions: {
822
886
  'org.primer.figma': {
@@ -827,28 +891,60 @@
827
891
  'org.primer.overrides': {
828
892
  dark: '#3685F3',
829
893
  'dark-high-contrast': {
830
- $value: '#3c79d0',
894
+ $value: {
895
+ colorSpace: 'hsl',
896
+ components: [215.3, 61.2, 52.5],
897
+ hex: '#3c79d0',
898
+ },
831
899
  },
832
900
  'dark-protanopia-deuteranopia-high-contrast': {
833
- $value: '#3c79d0',
901
+ $value: {
902
+ colorSpace: 'hsl',
903
+ components: [215.3, 61.2, 52.5],
904
+ hex: '#3c79d0',
905
+ },
834
906
  },
835
907
  'dark-tritanopia-high-contrast': {
836
- $value: '#3c79d0',
908
+ $value: {
909
+ colorSpace: 'hsl',
910
+ components: [215.3, 61.2, 52.5],
911
+ hex: '#3c79d0',
912
+ },
837
913
  },
838
914
  'dark-dimmed': {
839
- $value: '#3f7fdb',
915
+ $value: {
916
+ colorSpace: 'hsl',
917
+ components: [215.4, 68.4, 55.3],
918
+ hex: '#3f7fdb',
919
+ },
840
920
  },
841
921
  'dark-dimmed-high-contrast': {
842
- $value: '#3c79d0',
922
+ $value: {
923
+ colorSpace: 'hsl',
924
+ components: [215.3, 61.2, 52.5],
925
+ hex: '#3c79d0',
926
+ },
843
927
  },
844
928
  'light-high-contrast': {
845
- $value: '#033f9d',
929
+ $value: {
930
+ colorSpace: 'hsl',
931
+ components: [216.6, 96.3, 31.4],
932
+ hex: '#033f9d',
933
+ },
846
934
  },
847
935
  'light-tritanopia-high-contrast': {
848
- $value: '#033f9d',
936
+ $value: {
937
+ colorSpace: 'hsl',
938
+ components: [216.6, 96.3, 31.4],
939
+ hex: '#033f9d',
940
+ },
849
941
  },
850
942
  'light-protanopia-deuteranopia-high-contrast': {
851
- $value: '#033f9d',
943
+ $value: {
944
+ colorSpace: 'hsl',
945
+ components: [216.6, 96.3, 31.4],
946
+ hex: '#033f9d',
947
+ },
852
948
  },
853
949
  },
854
950
  },
@@ -946,19 +1042,35 @@
946
1042
  $value: '{base.color.blue.2}',
947
1043
  },
948
1044
  'dark-dimmed': {
949
- $value: '#3876d3',
1045
+ $value: {
1046
+ colorSpace: 'hsl',
1047
+ components: [216, 63.8, 52.4],
1048
+ hex: '#3876d3',
1049
+ },
950
1050
  },
951
1051
  'dark-dimmed-high-contrast': {
952
1052
  $value: '{base.color.blue.2}',
953
1053
  },
954
1054
  'light-high-contrast': {
955
- $value: '#0344a8',
1055
+ $value: {
1056
+ colorSpace: 'hsl',
1057
+ components: [216.4, 96.5, 33.5],
1058
+ hex: '#0344a8',
1059
+ },
956
1060
  },
957
1061
  'light-tritanopia-high-contrast': {
958
- $value: '#0344a8',
1062
+ $value: {
1063
+ colorSpace: 'hsl',
1064
+ components: [216.4, 96.5, 33.5],
1065
+ hex: '#0344a8',
1066
+ },
959
1067
  },
960
1068
  'light-protanopia-deuteranopia-high-contrast': {
961
- $value: '#0344a8',
1069
+ $value: {
1070
+ colorSpace: 'hsl',
1071
+ components: [216.4, 96.5, 33.5],
1072
+ hex: '#0344a8',
1073
+ },
962
1074
  },
963
1075
  },
964
1076
  },
@@ -984,19 +1096,35 @@
984
1096
  $value: '{base.color.blue.2}',
985
1097
  },
986
1098
  'dark-dimmed': {
987
- $value: '#3f7fdb',
1099
+ $value: {
1100
+ colorSpace: 'hsl',
1101
+ components: [215.4, 68.4, 55.3],
1102
+ hex: '#3f7fdb',
1103
+ },
988
1104
  },
989
1105
  'dark-dimmed-high-contrast': {
990
1106
  $value: '{base.color.blue.2}',
991
1107
  },
992
1108
  'light-high-contrast': {
993
- $value: '#033f9d',
1109
+ $value: {
1110
+ colorSpace: 'hsl',
1111
+ components: [216.6, 96.3, 31.4],
1112
+ hex: '#033f9d',
1113
+ },
994
1114
  },
995
1115
  'light-protanopia-deuteranopia-high-contrast': {
996
- $value: '#033f9d',
1116
+ $value: {
1117
+ colorSpace: 'hsl',
1118
+ components: [216.6, 96.3, 31.4],
1119
+ hex: '#033f9d',
1120
+ },
997
1121
  },
998
1122
  'light-tritanopia-high-contrast': {
999
- $value: '#033f9d',
1123
+ $value: {
1124
+ colorSpace: 'hsl',
1125
+ components: [216.6, 96.3, 31.4],
1126
+ hex: '#033f9d',
1127
+ },
1000
1128
  },
1001
1129
  },
1002
1130
  },
@@ -1,5 +1,12 @@
1
1
  {
2
2
  display: {
3
+ $description: 'Decorative colors for categorization and visual distinction without semantic meaning. Use for labels, tags, avatars, status indicators, and user-assigned colors. Do NOT use for success/error/warning states—use semantic colors (bgColor.success/danger/attention) instead.',
4
+ $extensions: {
5
+ 'org.primer.llm': {
6
+ usage: ['label', 'tag', 'avatar', 'badge', 'category-indicator', 'user-assigned-color', 'project-color', 'decorative-element'],
7
+ rules: 'Use display colors for arbitrary categorization where the color has no inherent meaning (e.g., project labels, user avatars). For meaningful states like success, error, or warning, use semantic colors instead. Scales 0-2 are lighter (backgrounds), 3-5 are mid-tones, 6-9 are darker (foregrounds/borders).',
8
+ },
9
+ },
3
10
  blue: {
4
11
  scale: {
5
12
  '0': {
@@ -108,6 +108,10 @@
108
108
  'org.primer.overrides': {
109
109
  dark: '{base.color.neutral.13}',
110
110
  },
111
+ 'org.primer.llm': {
112
+ doNotUse: true,
113
+ rules: 'Avoid using raw white. Use semantic alternatives: fgColor.onEmphasis for text on dark backgrounds, fgColor.onInverse for inverted contexts. Raw black/white ignore theme preferences and accessibility settings.',
114
+ },
111
115
  },
112
116
  },
113
117
  black: {
@@ -123,6 +127,10 @@
123
127
  'org.primer.overrides': {
124
128
  dark: '{base.color.neutral.0}',
125
129
  },
130
+ 'org.primer.llm': {
131
+ doNotUse: true,
132
+ rules: 'Avoid using raw black. Use semantic alternatives: fgColor.default for standard text, fgColor.muted for secondary text. Raw black/white ignore theme preferences and accessibility settings.',
133
+ },
126
134
  },
127
135
  },
128
136
  disabled: {
@@ -348,7 +356,11 @@
348
356
  },
349
357
  },
350
358
  danger: {
351
- $value: '#d1242f',
359
+ $value: {
360
+ colorSpace: 'hsl',
361
+ components: [356.2, 70.6, 48],
362
+ hex: '#d1242f',
363
+ },
352
364
  $type: 'color',
353
365
  $description: 'Danger text for errors and destructive actions',
354
366
  $extensions: {
@@ -1,6 +1,13 @@
1
1
  {
2
2
  color: {
3
3
  ansi: {
4
+ $description: 'ANSI terminal color palette for command-line interfaces and terminal emulators. Maps standard ANSI color names to theme-appropriate values.',
5
+ $extensions: {
6
+ 'org.primer.llm': {
7
+ usage: ['terminal-output', 'cli-interface', 'console-text', 'shell-prompt'],
8
+ rules: 'Use exclusively for terminal/CLI contexts. Do NOT use for general UI—use semantic colors (fgColor, bgColor) instead. These colors follow ANSI naming conventions (black, red, green, yellow, blue, magenta, cyan, white) with bright variants.',
9
+ },
10
+ },
4
11
  black: {
5
12
  $value: '{base.color.neutral.13}',
6
13
  $type: 'color',
@@ -221,7 +228,11 @@
221
228
  },
222
229
  },
223
230
  cyan: {
224
- $value: '#1b7c83',
231
+ $value: {
232
+ colorSpace: 'hsl',
233
+ components: [184, 65.8, 31],
234
+ hex: '#1b7c83',
235
+ },
225
236
  $type: 'color',
226
237
  $extensions: {
227
238
  'org.primer.figma': {
@@ -234,7 +245,11 @@
234
245
  },
235
246
  },
236
247
  'cyan-bright': {
237
- $value: '#3192aa',
248
+ $value: {
249
+ colorSpace: 'hsl',
250
+ components: [191.9, 55.3, 42.9],
251
+ hex: '#3192aa',
252
+ },
238
253
  $type: 'color',
239
254
  $extensions: {
240
255
  'org.primer.figma': {
@@ -248,6 +263,13 @@
248
263
  },
249
264
  },
250
265
  prettylights: {
266
+ $description: 'Syntax highlighting colors for code display. Used by GitHub code rendering (prettylights theme).',
267
+ $extensions: {
268
+ 'org.primer.llm': {
269
+ usage: ['code-syntax-highlighting', 'code-block', 'inline-code', 'diff-view'],
270
+ rules: 'Use exclusively for syntax highlighting in code display contexts. Do NOT use for general UI text or backgrounds. Each token maps to a specific syntax element (comment, keyword, string, etc.).',
271
+ },
272
+ },
251
273
  syntax: {
252
274
  comment: {
253
275
  $value: '{base.color.neutral.9}',