themes/ directory. Creating custom themes is simple and requires no code changes.
Theme Structure
Complete Schema
A theme JSON file contains 11 required properties:Property Reference
string
required
Display name of the theme (used in
--list-themes output)string
required
Brief description of the aesthetic and use case
hex color
required
Background color for the entire poster
hex color
required
Color for city name, country name, and coordinates text
hex color
required
Color used for top/bottom gradient fade effect. Usually matches
bg for subtle fade.hex color
required
Color for water features (rivers, lakes, ocean)
hex color
required
Color for parks and green spaces
hex color
required
Color for major highways and motorways (thickest roads)
hex color
required
Color for primary roads and main streets
hex color
required
Color for secondary roads
hex color
required
Color for tertiary roads
hex color
required
Color for residential streets (thinnest roads)
hex color
required
Fallback color for roads without specific classification
Creating a Custom Theme
Step 1: Create JSON File
Create a new.json file in the themes/ directory:
Step 2: Define Colors
Add your color palette:themes/my_theme.json
Step 3: Use Your Theme
Reference by filename (without.json):
Design Guidelines
Road Hierarchy
Roads should follow a visual hierarchy from major to minor:- Gradient (Recommended)
- Saturation
- Opacity (via Alpha)
- Two-Tone
Use a smooth gradient from dark to light:Best for: Most themes, creates natural depth
Contrast & Readability
Background vs. Roads:- Ensure sufficient contrast between
bgand road colors - Test with both dense cities (many roads) and sparse cities (few roads)
- Text must be clearly readable against
bg - Aim for WCAG AA contrast ratio (4.5:1 minimum)
- Should be distinguishable from
bgbut subtle - Usually slightly lighter or darker than
bg
Color Harmony
Monochromatic
Monochromatic
Use a single hue with varying lightness/saturation:Examples: Monochrome Blue, Ocean
Analogous
Analogous
Use adjacent colors on the color wheel:Examples: Sunset, Autumn, Terracotta
Complementary
Complementary
Use opposite colors on the color wheel:Examples: Copper Patina
High Contrast
High Contrast
Maximum contrast for dramatic effect:Examples: Noir, Contrast Zones
Example Themes
Example 1: Retro Gameboy
themes/gameboy.json
Example 2: Vaporwave
themes/vaporwave.json
Example 3: Sepia Vintage
themes/sepia_vintage.json
Example 4: Matrix
themes/matrix.json
Example 5: Lavender Fields
themes/lavender.json
Testing Your Theme
Quick Test
Test with a well-known city:Test Multiple City Types
Test your theme with different urban patterns:Validation Checklist
1
Contrast Check
Verify text is readable against background
2
Road Hierarchy
Ensure major roads stand out more than minor roads
3
Water Visibility
Check water features are distinguishable (test Venice or Amsterdam)
4
Park Visibility
Verify parks are visible but subtle (test Paris or London)
5
Dense vs. Sparse
Test with both dense cities (Tokyo) and sparse cities (suburbs)
Advanced Techniques
Gradient Fade Effect
Thegradient_color creates a subtle fade at top and bottom of the poster:
Color Temperature
Warm Themes (welcoming, vintage):- Use reds, oranges, yellows, warm browns
- Examples: Sunset, Autumn, Terracotta
- Use blues, cyans, purples, cool grays
- Examples: Ocean, Blueprint, Midnight Blue
- Use grays, beiges, balanced tones
- Examples: Noir, Warm Beige, Pastel Dream
Accessibility
Ensure your theme works for colorblind users:- Use lightness/darkness variation (not just hue)
- Avoid red/green as the only differentiator
- Test with colorblind simulators
Troubleshooting
Theme not appearing in --list-themes
Theme not appearing in --list-themes
Ensure:
- File is in
themes/directory - File has
.jsonextension - JSON is valid (use a JSON validator)
- All 11 properties are present
Invalid JSON error
Invalid JSON error
Common JSON mistakes:
Roads not visible
Roads not visible
Increase contrast between roads and background:
Text not readable
Text not readable
Ensure sufficient contrast:
All roads look the same
All roads look the same
Increase the gradient range:
Sharing Your Theme
If you create a great theme:- Test thoroughly with multiple cities
- Choose a descriptive name and write clear description
- Consider contributing back to the project
- Share screenshots on social media
Next Steps
Theme Gallery
Browse all built-in themes for inspiration
Advanced Examples
See advanced usage patterns and techniques