xAI

Grok Color Design System Rules

Export a structured ai-color-rules.md file with your brand's 46 semantic color tokens, CSS variables, Tailwind mappings, and WCAG accessibility data — optimized for Grok.

Grok Color design system context for Grok AI coding assistant
ai-color-rules.md
Select a color to generate AI skill preview

Setup Guide for Grok

Get your AI color rules working in under 2 minutes.

1

Export your skill file

Go to your palette → Export → AI Coding Rules → Generic. Copy or download the markdown.

2

Add to Grok context

Paste the color rules into your Grok conversation or use it as a system prompt when using the xAI API.

3

Generate on-brand code

Prompt Grok to create components. It will use your semantic tokens and maintain WCAG contrast requirements.

Project Structure
xAI API / Grok
└── System Prompt
    └── Paste color rules here

— or —

your-project/
├── ai-color-rules.md  ← AI color rules
├── src/
└── ...

How Grok Uses Color Design System Rules

When you place a ai-color-rules.md file in your project, Grok reads it as part of its context window. This means every code suggestion, component generation, and refactoring task references your exact color tokens instead of guessing.

The exported file includes all 46 semantic color roles (brand, surface, text, status, border), their hex/RGB/HSL values, CSS custom properties, Tailwind class mappings, and WCAG contrast ratios. Grok uses this data to:

  • Generate React/Vue/Svelte components with correct color tokens
  • Suggest accessible color pairs that meet WCAG AA/AAA standards
  • Apply consistent theming across light and dark modes
  • Write CSS/Tailwind code using your design system variables
  • Maintain visual consistency across your entire codebase

Export Your Grok Color Rules Now

Create your brand palette, then export AI coding rules from the Export tab. Grok will produce on-brand code from day one.