color-palette.md. This is the single source of truth for all color choices in your diagrams—shape fills, strokes, text colors, evidence artifact backgrounds, everything.
The Customization Philosophy
Everything else in this skill is universal design methodology and Excalidraw best practices. To make this skill produce diagrams in your own brand style, you only need to edit one file.Locating the Color Palette
The color palette is at:- Shape Colors (semantic purpose-based)
- Text Colors (hierarchy-based)
- Evidence Artifact Colors (for code/data examples)
- Default Stroke & Line Colors
Editing the Color Palette
Edit the Shape Colors (Semantic) section. Each row defines a semantic purpose with a fill and stroke color.
| Semantic Purpose | Fill | Stroke |
|------------------|------|--------|
| Primary/Neutral | `#0066cc` | `#003366` |
| Level | Color | Use For |
|-------|-------|---------|
| Title | `#003366` | Section headings, major labels |
| Subtitle | `#0066cc` | Subheadings, secondary labels |
| Body/Detail | `#64748b` | Descriptions, annotations, metadata |
Maintain clear hierarchy: titles should be the darkest, subtitles medium, body/detail the lightest. This ensures readability.
| Artifact | Background | Text Color |
|----------|-----------|------------|
| Code snippet | `#1e293b` | Syntax-colored (language-appropriate) |
| JSON/data example | `#1e293b` | `#22c55e` (green) |
Most users keep the dark background (
#1e293b) since it’s conventional for code blocks. You can change the text color to match your brand’s accent color.# If editing with vim/nano/etc:
:wq
# Or if using Edit tool:
Edit ~/.claude/skills/excalidraw-diagram/references/color-palette.md ...
Complete Example: Custom Brand Palette
Here’s a full example of customizing the palette for a fictional brand “TechFlow” with purple as the primary color:- Primary changed from blue (
#3b82f6) to purple (#9333ea) - Stroke darkened to maintain contrast (
#4a1d7a) - Secondary adjusted to lighter purple (
#c084fc) - Start/End colors remain distinct but harmonize with the new palette
Color Pairing Guidelines
Fill + Stroke Contrast
Ensure sufficient contrast between fill and stroke:- Good Contrast
- Poor Contrast
Text on Colored Backgrounds
When text sits inside a colored shape, ensure readability: Rule of thumb:- Light fills → dark text (
#374151or darker) - Dark fills → white text (
#ffffff)
Semantic Color Meanings
When customizing, maintain the semantic meanings:| Purpose | What It Represents | Recommended Colors |
|---|---|---|
| Primary/Neutral | Default shapes, main content | Brand primary color |
| Secondary | Supporting elements | Brand secondary/accent |
| Tertiary | Least important shapes | Lighter/muted variant |
| Start/Trigger | Beginning of flow, inputs | Warm colors (orange, yellow) |
| End/Success | Completion, outputs, success states | Green tones |
| Warning/Reset | Caution, resets, destructive actions | Red/pink tones |
| Decision | Branching points, choices | Yellow/gold tones |
| AI/LLM | AI-powered components | Purple tones |
| Inactive/Disabled | Not currently active | Muted blue with dashed stroke |
| Error | Error states, failures | Red tones |
Testing Your Customizations
After editingcolor-palette.md, create a test diagram:
{
"type": "excalidraw",
"version": 2,
"source": "https://excalidraw.com",
"elements": [
{
"id": "primary_test",
"type": "rectangle",
"x": 100,
"y": 100,
"width": 180,
"height": 90,
"strokeColor": "#4a1d7a",
"backgroundColor": "#9333ea",
"text": "Primary",
"fontSize": 20,
"fontFamily": 3,
"textAlign": "center",
"verticalAlign": "middle",
"roughness": 0,
"opacity": 100,
"seed": 1
}
],
"appState": {"viewBackgroundColor": "#ffffff", "gridSize": 20},
"files": {}
}
cd ~/.claude/skills/excalidraw-diagram/references
uv run python render_excalidraw.py test-colors.excalidraw
Advanced: Color Accessibility
For diagrams that will be viewed by colorblind users or in print/grayscale:Use patterns in addition to color
Use patterns in addition to color
Differentiate elements with:
- Different shapes (rectangle vs ellipse vs diamond)
- Different stroke widths (
strokeWidth: 1vsstrokeWidth: 3) - Dashed vs solid strokes (
strokeStyle: "dashed"vs"solid")
Test in grayscale
Test in grayscale
Convert your rendered PNG to grayscale to verify that:
- Different elements are still distinguishable
- Text remains readable
- Flow is still clear without color cues
Ensure sufficient contrast ratios
Ensure sufficient contrast ratios
Use a contrast checker (e.g., WebAIM) to verify:
- Text vs background: minimum 4.5:1 for normal text
- Stroke vs fill: minimum 3:1 for visual clarity
Troubleshooting
My custom colors aren't being used
My custom colors aren't being used
Ensure you:
- Saved the
color-palette.mdfile after editing - Used valid hex color codes (e.g.,
#3b82f6, notblueorrgb(59, 130, 246)) - Kept the same semantic purpose names (don’t rename “Primary/Neutral” to “Main Color”)
Colors look good individually but clash together
Colors look good individually but clash together
Check color harmony:
- Use a tool like Adobe Color or Coolors to validate your palette
- Ensure all colors are from the same “family” (similar saturation/brightness)
- Test with a full diagram, not just individual shapes
Text is unreadable on my custom backgrounds
Text is unreadable on my custom backgrounds
Adjust the “On light fills” / “On dark fills” text colors:
- Light fills need darker text (try
#1f2937or darker) - Dark fills need white or very light text (
#ffffffor#f9fafb)
Next Steps
Creating Diagrams
Start creating diagrams with your new brand colors
Color Palette Reference
See the full default color palette reference
Element Templates
Use templates that reference your custom colors