This shows how to use Single Color Image programatically. Click here to go back to the demo.
The API is simple. It takes two arguments:
41427a. These can be uppercase or lowercase but must be 6 hex digits.
Then, load the URL like this:
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:
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.
All API responses are free license and released into the public domain.