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
Scaffold the plugin -- Create apps/figma-plugin/ in the monorepo. Use Figma's Plugin API with a React UI panel (manifest.json, code.ts for sandbox, ui.tsx for the iframe)
Bundle the core engine -- Import @colorx/core via the pnpm workspace. Configure esbuild or Vite to bundle it into the plugin's sandbox code
Build the plugin UI -- Color picker input, generate button, light/dark theme preview with swatches (reuse the same component patterns from the web app)
Inject tokens as Figma variables -- Use the Figma Variables API (figma.variables.createVariable()) to create a variable collection with all 15 tokens for both light and dark modes
Inject as local paint styles -- Fallback for teams not using variables yet. Create ColorX/primary, ColorX/text, etc. as solid paint styles via figma.createPaintStyle()
Add contrast audit panel -- Read existing color styles from the current Figma file (figma.getLocalPaintStyles()), run them through checkContrast and checkAPCA, display pass/fail results in the UI
Add CVD simulation preview -- Show simulated swatches for each deficiency type in the plugin panel so designers can check before handoff
Test with real design files -- Load the plugin in Figma dev mode, test with various files, verify variables sync correctly
Figma Plugin
Steps:
figma.variables.createVariable()) to create a variable collection with all 15 tokens for both light and dark modesfigma.createPaintStyle()figma.getLocalPaintStyles()), run them throughcheckContrastandcheckAPCA, display pass/fail results in the UI