Simple way to generate your own color images via HTTP requests
To set the color of the image you can pass the &color
query parameter. You pass in a hex color value (e.g. &color=ff0000
)
![Color](https://colorsplash.vercel.app/api?color=00ee77)
You can also pass in an alfa value with the &color
query paramter. The image in the response will then have an alfa value.
![Color](https://colorsplash.vercel.app/api?color=00ee7750)
Note
If the alfa value is ff
the image will be a RGB image, not RGBA.
You can set the size of the image by passing the &width
and &height
query parameters.
![Color](https://colorsplash.vercel.app/api?width=50&height=10)
Adding a color gradient is done by passing the colors with the &colors
query parameter. The &color
parameter is still required. This value will be used as the first color in the gradient.
![Color](https://colorsplash.vercel.app/api?color=00ee77&colors=4287f5)
You can pass multiple colors in the &colors
parameter, they have to be separated by a ,
.
![Color](https://colorsplash.vercel.app/api?color=00ee77&colors=4287f5,cb42f5)
Name | Description | Type | Default |
---|---|---|---|
color |
Set the color of the image | string | ffffff |
width |
Set the width of the image | int | 16 |
height |
Set the height of the image | int | 16 |
colors |
Used for making a color | string |