API Reference
Generate color palette images on the fly. No authentication required. Images are cached for 7 days.
Caching & Rate Limits
Images are cached for 7 days. Cached requests have no rate limit. New palette generations are limited to 10 per minute per IP.
Base URL
Base URL:https://palettd.com/api
Endpoints
GET
/palette/{colors}.{format}Generate a color palette image from a comma-separated list of hex colors.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| colors | string | Comma-separated hex colors without # (e.g., 6366F1,EC4899) |
| format | string | Output format: svg or png |
Examples
SVG output
GET https://palettd.com/api/palette/6366F1,EC4899,F59E0B,10B981.svg PNG output
GET https://palettd.com/api/palette/FF6600,0B1320,FFFFFF.png Response
Success Response
Returns the generated image with appropriate content type.
| Status | 200 OK |
| Content-Type | image/svg+xml or image/png |
| Cache-Control | public, max-age=604800 (7 days) |
Error Responses
400Bad Request
Invalid color format or no valid colors provided.
429Too Many Requests
Rate limit exceeded. Wait before making more requests.
Usage Examples
HTML
<img src="https://palettd.com/api/palette/6366F1,EC4899.svg" alt="Color Palette" />
Markdown (GitHub README)

cURL
curl -o palette.svg https://palettd.com/api/palette/6366F1,EC4899.svg