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

ParameterTypeDescription
colorsstringComma-separated hex colors without # (e.g., 6366F1,EC4899)
formatstringOutput 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.

Status200 OK
Content-Typeimage/svg+xml or image/png
Cache-Controlpublic, 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)

![Brand Colors](https://palettd.com/api/palette/6366F1,EC4899,F59E0B.png)

cURL

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

MIT License. Open source on GitHub.

Built with Node.js