LyubomirT / colorsplash-pr

Simple way to generate your own color images via HTTP requests

Home Page:https://colorsplash.vercel.app/api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Colorsplash

Simple way to generate your own color images via HTTP requests

Features

Color image

Setting a color

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)

Example: Color

Passing an alfa value

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)

Example: Color

Note

If the alfa value is ff the image will be a RGB image, not RGBA.

Setting the size of the image

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)

Example: Color

Setting a gradient

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)

Example: Color

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)

Example: Color

All query parameters

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

About

Simple way to generate your own color images via HTTP requests

https://colorsplash.vercel.app/api

License:Apache License 2.0


Languages

Language:Python 100.0%