You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: COLOR-PRESETS-GUIDE.md
+129-1Lines changed: 129 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -211,4 +211,132 @@ The plugin generates:
211
211
-**Unexpected names**: Check your variable naming structure and hierarchy
212
212
-**Empty color presets**: Verify that you have COLOR type variables in collections other than "Primitives"
213
213
214
-
For more information on WordPress color presets, see the [WordPress documentation](https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/#color).
214
+
For more information on WordPress color presets, see the [WordPress documentation](https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/#color).
215
+
216
+
# Color Presets Guide - Paint Style Integration
217
+
218
+
This guide explains how the Figma to WordPress Theme.json Exporter handles color presets with Paint Style integration for better labeling control.
219
+
220
+
## Overview
221
+
222
+
The plugin now uses **Paint Styles** for user-friendly display names while maintaining **Variables** for proper CSS variable references. This gives you the best of both worlds:
223
+
224
+
-**Paint Styles**: Provide human-readable, designer-friendly names
225
+
-**Variables**: Ensure proper CSS variable references and maintain design system consistency
226
+
227
+
## How It Works
228
+
229
+
### 1. Variable-Based Colors with Paint Style Labels
230
+
231
+
When you have a Paint Style that references a Variable:
232
+
233
+
```
234
+
Paint Style: "Midnight"
235
+
↓ references
236
+
Variable: "brand/primary"
237
+
↓ generates
238
+
WordPress Preset: {
239
+
name: "Midnight", // From Paint Style
240
+
slug: "brand-primary", // From Variable name
241
+
color: "var(--wp--custom--brand--primary)" // From Variable
242
+
}
243
+
```
244
+
245
+
### 2. Standalone Paint Styles
246
+
247
+
When you have a Paint Style without bound variables:
248
+
249
+
```
250
+
Paint Style: "Standalone Blue"
251
+
↓ generates
252
+
WordPress Preset: {
253
+
name: "Standalone Blue", // From Paint Style
254
+
slug: "standalone-blue", // From Paint Style name
255
+
color: "#0000ff" // Direct hex value
256
+
}
257
+
```
258
+
259
+
### 3. Variables Without Paint Styles
260
+
261
+
When you have a Variable without a bound Paint Style:
262
+
263
+
```
264
+
Variable: "brand/primary"
265
+
↓ generates
266
+
WordPress Preset: {
267
+
name: "Brand Primary", // From Variable name
268
+
slug: "brand-primary", // From Variable name
269
+
color: "var(--wp--custom--brand--primary)" // From Variable
270
+
}
271
+
```
272
+
273
+
## Best Practices
274
+
275
+
### For Designers
276
+
277
+
1.**Create Paint Styles** for colors you want to appear in the UI with friendly names
278
+
2.**Bind Paint Styles to Variables** for design system consistency
Copy file name to clipboardExpand all lines: INSTALL.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@
12
12
13
13
If you're installing the plugin manually:
14
14
15
-
1. Download the plugin files from the repository
15
+
1. Download the latest plugin release or clone this repository and run `npm install && npm run build`
16
16
2. In Figma, go to Menu > Plugins > Development > Import plugin from manifest
17
17
3. Select the manifest.json file from the downloaded files
18
18
@@ -52,7 +52,7 @@ For the best results when using the WordPress Theme.json Exporter:
52
52
2. Go to Menu > Plugins > WordPress Theme.json Export > Export to theme.json
53
53
3. In the plugin UI, you can:
54
54
- Choose to include typography presets (from text styles)
55
-
- Generate color presets with customizable selection
55
+
- Generate color presets with customizable selection (If adding/editing variables, you may need to close and reopen the plugin if color variables are msising)
56
56
- Generate spacing presets from spacing variables
57
57
- Upload an existing theme.json file to merge variables into it
58
58
- Preview the generated theme.json and additional style files
0 commit comments