Skip to content
moxon home

Color Generation

The /color endpoint generates a random color in multiple formats. This endpoint does not require any options.

gethttps://api.moxon.dev/v3/color

Parameters

This endpoint does not require any parameters.

Request Example

Request
GET /v3/color

Response

Response
{
    "hex": "#517fff",
    "rgb": "rgb(81, 127, 255)",
    "hsl": "hsl(224, 100%, 66%)",
    "hsv": "hsv(224, 68.2%, 100%)",
    "hwb": "hwb(224, 32%, 0%)",
    "cmyk": "cmyk(68.24%, 50.2%, 0%, 0%)"
}

Response Fields

FieldDescription
hexHexadecimal color code
rgbRGB color format
hslHSL color format (Hue, Saturation, Lightness)
hsvHSV color format (Hue, Saturation, Value)
hwbHWB color format (Hue, Whiteness, Blackness)
cmykCMYK color format (Cyan, Magenta, Yellow, Key/Black)

cURL

cURL
curl -X GET "https://api.moxon.dev/v3/color"