Color Palette

Privacy Sketch includes a Tailwind-inspired color palette with 150+ colors. Use hex values directly or reference named colors for consistent, beautiful diagrams.

Using Colors in JSON

Colors are specified in the options object using hex format:

{
  "type": "rectangle",
  "options": {
    "fill": "#dbeafe",       // Light blue fill
    "stroke": "#3b82f6",     // Blue border
    "strokeWidth": 2
  }
}

Color Properties

Property Description Example
fill Interior fill color "#fef3c7"
stroke Border/outline color "#f59e0b"

For text elements, the stroke property sets the text color:

{
  "type": "text",
  "text": "Hello World",
  "options": {
    "stroke": "#1e293b"   // Text color
  }
}

Quick Reference - Common Colors

These are the most frequently used colors for diagrams:

Red
#ef4444
Orange
#f97316
Amber
#f59e0b
Yellow
#eab308
Green
#22c55e
Teal
#14b8a6
Cyan
#06b6d4
Blue
#3b82f6
Indigo
#6366f1
Violet
#8b5cf6
Purple
#a855f7
Pink
#ec4899

Full Color Palette

Complete Tailwind-inspired palette. Click any color to copy its hex value.

Slate (Neutral)

Slate
50#f8fafc
100#f1f5f9
200#e2e8f0
300#cbd5e1
400#94a3b8
500#64748b
600#475569
700#334155
800#1e293b
900#0f172a

Red

Red
50#fef2f2
100#fee2e2
200#fecaca
300#fca5a5
400#f87171
500#ef4444
600#dc2626
700#b91c1c
800#991b1b
900#7f1d1d

Amber

Amber
50#fffbeb
100#fef3c7
200#fde68a
300#fcd34d
400#fbbf24
500#f59e0b
600#d97706
700#b45309
800#92400e
900#78350f

Green

Green
50#f0fdf4
100#dcfce7
200#bbf7d0
300#86efac
400#4ade80
500#22c55e
600#16a34a
700#15803d
800#166534
900#14532d

Blue

Blue
50#eff6ff
100#dbeafe
200#bfdbfe
300#93c5fd
400#60a5fa
500#3b82f6
600#2563eb
700#1d4ed8
800#1e40af
900#1e3a8a

Indigo

Indigo
50#eef2ff
100#e0e7ff
200#c7d2fe
300#a5b4fc
400#818cf8
500#6366f1
600#4f46e5
700#4338ca
800#3730a3
900#312e81

Pink

Pink
50#fdf2f8
100#fce7f3
200#fbcfe8
300#f9a8d4
400#f472b6
500#ec4899
600#db2777
700#be185d
800#9d174d
900#831843

Recommended Background Colors

These colors work great as canvas or shape backgrounds:

White
#ffffff
Paper
#fdfcfa
Cream
#f0e6d3
Slate 50
#f8fafc
Dark
#1e293b

Color Best Practices

1. Use 100-level for fills, 500-level for strokes

For readable, professional diagrams, use light shades (50-200) for shape fills and darker shades (500-700) for borders:

{
  "options": {
    "fill": "#dbeafe",      // blue.100 (light)
    "stroke": "#3b82f6"     // blue.500 (saturated)
  }
}

2. Limit your palette to 2-3 colors

Professional diagrams use a limited color palette. Pick one primary color and optionally an accent:

Recommended Combinations

Blue + Amber • Green + Slate • Indigo + Pink • Purple + Amber

3. Use slate for text and borders

Always use dark slate colors for text to ensure readability:

{
  "type": "text",
  "options": { "stroke": "#1e293b" }  // slate.800
}