A simple project to generate placeholder images written in Go.
Download with git clone and install dependencies
$ git clone git@github.com:lamecksilva/placeholder-gen.git
$ cd placeholder-gen
$ go mod download
I recommend running with Air package:
$ air
The server will start in port 8080
GET /generate
Parameter | Type | Description |
---|---|---|
width |
number |
Required. Width of Image |
heigth |
number |
Required. Heigth of Image |
color |
string |
Background color |
label |
string |
Label of image, placed in center |
label-color |
string |
Color of label text |
OBS: The default label color is contrast color of Background color, eg:
background color white -> label color black.