Skip to main content
All colors and brand-specific styles live in one file: 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.
The skill reads color-palette.md before generating any diagram and uses it as the authoritative source for all color decisions.

Locating the Color Palette

The color palette is at:
~/.claude/skills/excalidraw-diagram/references/color-palette.md
This file defines four categories of colors:
  1. Shape Colors (semantic purpose-based)
  2. Text Colors (hierarchy-based)
  3. Evidence Artifact Colors (for code/data examples)
  4. Default Stroke & Line Colors

Editing the Color Palette

1
Step 1: Read the Current Palette
2
First, view the current color definitions:
3
cat ~/.claude/skills/excalidraw-diagram/references/color-palette.md
4
You’ll see tables defining colors for each semantic purpose.
5
Step 2: Choose Your Brand Colors
6
Identify your brand’s color palette. You’ll need:
7
  • Primary brand color
  • Secondary/accent colors
  • Neutral/gray tones
  • Colors for semantic states (success, warning, error)
  • 8
    Use hex color codes (e.g., #3b82f6) for consistency with Excalidraw’s JSON format.
    9
    Step 3: Update Shape Colors
    10
    Edit the Shape Colors (Semantic) section. Each row defines a semantic purpose with a fill and stroke color.
    11
    Example: Changing the Primary/Neutral color to your brand blue:
    12
    | Semantic Purpose | Fill | Stroke |
    |------------------|------|--------|
    | Primary/Neutral | `#0066cc` | `#003366` |
    
    13
    Key principles:
    14
  • Always pair a darker stroke with a lighter fill for contrast
  • The stroke should be readable against both the fill and white background
  • Test colors by rendering a diagram (see Render & Validate)
  • 15
    Step 4: Update Text Colors
    16
    Edit the Text Colors (Hierarchy) section to match your brand’s typography colors:
    17
    | Level | Color | Use For |
    |-------|-------|---------|  
    | Title | `#003366` | Section headings, major labels |
    | Subtitle | `#0066cc` | Subheadings, secondary labels |
    | Body/Detail | `#64748b` | Descriptions, annotations, metadata |
    
    18
    Maintain clear hierarchy: titles should be the darkest, subtitles medium, body/detail the lightest. This ensures readability.
    19
    Step 5: Customize Evidence Artifacts (Optional)
    20
    If you want to change the styling of code snippets and data examples:
    21
    | Artifact | Background | Text Color |
    |----------|-----------|------------|
    | Code snippet | `#1e293b` | Syntax-colored (language-appropriate) |
    | JSON/data example | `#1e293b` | `#22c55e` (green) |
    
    22
    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.
    23
    Step 6: Save and Test
    24
    After editing, save the file:
    25
    # If editing with vim/nano/etc:
    :wq
    
    # Or if using Edit tool:
    Edit ~/.claude/skills/excalidraw-diagram/references/color-palette.md ...
    
    26
    Then generate a test diagram and render it to verify your colors look good together.

    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:
    ## Shape Colors (Semantic)
    
    | Semantic Purpose | Fill | Stroke |
    |------------------|------|--------|
    | Primary/Neutral | `#3b82f6` | `#1e3a5f` |
    | Secondary | `#60a5fa` | `#1e3a5f` |
    | Start/Trigger | `#fed7aa` | `#c2410c` |
    | End/Success | `#a7f3d0` | `#047857` |
    
    Notice:
    • 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:
    {
      "backgroundColor": "#9333ea",  // Light-ish purple fill
      "strokeColor": "#4a1d7a"       // Dark purple stroke
    }
    
    Result: Clear, readable outline.

    Text on Colored Backgrounds

    When text sits inside a colored shape, ensure readability: Rule of thumb:
    • Light fills → dark text (#374151 or darker)
    • Dark fills → white text (#ffffff)
    From the palette:
    | Level | Color | Use For |
    |-------|-------|---------|  
    | On light fills | `#374151` | Text inside light-colored shapes |
    | On dark fills | `#ffffff` | Text inside dark-colored shapes |
    

    Semantic Color Meanings

    When customizing, maintain the semantic meanings:
    PurposeWhat It RepresentsRecommended Colors
    Primary/NeutralDefault shapes, main contentBrand primary color
    SecondarySupporting elementsBrand secondary/accent
    TertiaryLeast important shapesLighter/muted variant
    Start/TriggerBeginning of flow, inputsWarm colors (orange, yellow)
    End/SuccessCompletion, outputs, success statesGreen tones
    Warning/ResetCaution, resets, destructive actionsRed/pink tones
    DecisionBranching points, choicesYellow/gold tones
    AI/LLMAI-powered componentsPurple tones
    Inactive/DisabledNot currently activeMuted blue with dashed stroke
    ErrorError states, failuresRed tones
    Don’t invent new semantic categories. If a concept doesn’t fit an existing category, use Primary/Neutral or Secondary. Adding custom categories won’t be recognized by the skill.

    Testing Your Customizations

    After editing color-palette.md, create a test diagram:
    1
    Create a simple test diagram
    2
    {
      "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": {}
    }
    
    3
    Render it
    4
    cd ~/.claude/skills/excalidraw-diagram/references
    uv run python render_excalidraw.py test-colors.excalidraw
    
    5
    Review the PNG
    6
    View test-colors.png to verify:
    7
  • Colors render as expected
  • Fill/stroke contrast is sufficient
  • Text is readable on colored backgrounds
  • 8
    Iterate if needed
    9
    If colors don’t look right, edit color-palette.md again and re-test.

    Advanced: Color Accessibility

    For diagrams that will be viewed by colorblind users or in print/grayscale:
    Differentiate elements with:
    • Different shapes (rectangle vs ellipse vs diamond)
    • Different stroke widths (strokeWidth: 1 vs strokeWidth: 3)
    • Dashed vs solid strokes (strokeStyle: "dashed" vs "solid")
    Convert your rendered PNG to grayscale to verify that:
    • Different elements are still distinguishable
    • Text remains readable
    • Flow is still clear without color cues
    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

    Ensure you:
    1. Saved the color-palette.md file after editing
    2. Used valid hex color codes (e.g., #3b82f6, not blue or rgb(59, 130, 246))
    3. Kept the same semantic purpose names (don’t rename “Primary/Neutral” to “Main Color”)
    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
    Adjust the “On light fills” / “On dark fills” text colors:
    • Light fills need darker text (try #1f2937 or darker)
    • Dark fills need white or very light text (#ffffff or #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

    Build docs developers (and LLMs) love