Single Color Image API

This shows how to use Single Color Image programatically. Click here to go back to the demo.

Quick start

This:

https://singlecolorimage.com/get/33fd8f/400x100

Returns this:

Example result image

Detailed docs

The API is simple. It takes two arguments:

  1. A 6-digit hex color, like ff85a9 or 41427a. These can be uppercase or lowercase but must be 6 hex digits.
  2. A width and a height in pixels, like 200 by 300. Maximum dimensions are 5000 by 5000; please request larger sizes if you need them.

Then, load the URL like this:

https://singlecolorimage.com/get/{{hex digits}}/{{width}}x{{height}}

This will return a PNG image. If you make a bad API call (improper formatting, image too large, etc), you will get a 1x1 black PNG with the appropriate HTTP status code.

You may optionally include a suffix, .png. For example, these two URLs are equivalent:

https://singlecolorimage.com/get/33fd8f/400x100
https://singlecolorimage.com/get/33fd8f/400x100.png

You may be rate limited at 100 requests per IP address per hour. You may exceed this limit, but that isn't guaranteed. If you are rate limited, you'll receive a 429 status code and a 1x1 black PNG.

Licensing

All API responses are free license and released into the public domain under the CC0 license.