GET /v1/color-converterConvert colors via GET
Format Utils lf-format-utils
Changes a colour from one way of writing it to another, like from a hex code to RGB values. Converts colors between HEX, RGB, HSL, and CMYK formats. Accepts hex values, named colors, rgb(), or hsl() strings.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
color | string | Yes | Color value (HEX, named, rgb, hsl) |
format | string | No | Input format (hex/rgb/hsl) |
Response Schema
success (boolean): Operation success
hex (string): HEX value
rgb (object): RGB values
hsl (object): HSL values
cmyk (object): CMYK values
named (string): Named color if recognized
luminance (integer): Luminance value
is_dark (boolean): Whether color is dark
cURL Example
curl 'https://lf-format-utils.laminarforge.dev/v1/color-converter?color=ff5733' -H 'Authorization: Bearer lf_YourApiKey'
Python Example
import requests
url = 'https://lf-format-utils.laminarforge.dev/v1/color-converter'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'color': 'ff5733'}
response = requests.get(url, headers=headers, params=params)
print(response.json())