https://github.com/simonstnn/colorsplash
Simple way to generate your own color images via HTTP requests
https://github.com/simonstnn/colorsplash
api color image
Last synced: 6 months ago
JSON representation
Simple way to generate your own color images via HTTP requests
- Host: GitHub
- URL: https://github.com/simonstnn/colorsplash
- Owner: SimonStnn
- License: apache-2.0
- Created: 2024-01-22T18:40:40.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-26T10:34:42.000Z (about 2 years ago)
- Last Synced: 2025-02-07T06:02:55.249Z (over 1 year ago)
- Topics: api, color, image
- Language: Python
- Homepage: https://colorsplash.vercel.app/api
- Size: 35.2 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Colorsplash
Simple way to generate your own color images via HTTP requests
## Features
- [Colorsplash](#colorsplash)
- [Features](#features)
- [Color image](#color-image)
- [Setting a color](#setting-a-color)
- [Passing an alfa value](#passing-an-alfa-value)
- [Setting the size of the image](#setting-the-size-of-the-image)
- [Setting a gradient](#setting-a-gradient)
- [All query parameters](#all-query-parameters)
## 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`)
```md

```
> Example: 
### 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.
```md

```
> Example: 
> [!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.
```md

```
> Example: 
### 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.
```md

```
> Example: 
You can pass multiple colors in the `&colors` parameter, they have to be separated by a `,`.
```md

```
> Example: 
## 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 | |