← All tool references

Generators · not_available

Random Color Generator

Random Color with transparent inputs and reviewable results.

Open public tool

Overview

Category
Generators
API mode
not_available
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/random-color-generator

View this descriptor as JSON

Execute availability

This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.

POST /api/v1/tools/random-color-generator/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

quantity · number · required
Enter colors.
format · string · required
Enter primary format. Accepted values: hex, rgb, hsl.
minimum_saturation · number · required
Enter minimum saturation.
minimum_lightness · number · required
Enter minimum lightness.
maximum_lightness · number · required
Enter maximum lightness.
{
    "type": "object",
    "properties": {
        "quantity": {
            "type": "number",
            "description": "Enter colors."
        },
        "format": {
            "type": "string",
            "description": "Enter primary format.",
            "enum": [
                "hex",
                "rgb",
                "hsl"
            ]
        },
        "minimum_saturation": {
            "type": "number",
            "description": "Enter minimum saturation."
        },
        "minimum_lightness": {
            "type": "number",
            "description": "Enter minimum lightness."
        },
        "maximum_lightness": {
            "type": "number",
            "description": "Enter maximum lightness."
        }
    },
    "required": [
        "quantity",
        "format",
        "minimum_saturation",
        "minimum_lightness",
        "maximum_lightness"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

colors · array
Generated colors produced by the tool.
quantity · number
Color count produced by the tool.
palette_css · string
CSS variables produced by the tool.
{
    "type": "object",
    "properties": {
        "colors": {
            "type": "array",
            "description": "Generated colors produced by the tool."
        },
        "quantity": {
            "type": "number",
            "description": "Color count produced by the tool."
        },
        "palette_css": {
            "type": "string",
            "description": "CSS variables produced by the tool."
        }
    },
    "additionalProperties": false
}

Random Color Generator worked example

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/random-color-generator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "quantity": 8,
    "format": "hex",
    "minimum_saturation": 45,
    "minimum_lightness": 30,
    "maximum_lightness": 75
}'
{
    "ok": true,
    "data": {
        "slug": "random-color-generator",
        "result": {
            "values": {
                "colors": [
                    {
                        "number": 1,
                        "hsl": "hsl(124 54% 58%)",
                        "hex": "#7C6CAE"
                    },
                    {
                        "number": 2,
                        "hsl": "hsl(132 77% 51%)",
                        "hex": "#849A99"
                    },
                    {
                        "number": 3,
                        "hsl": "hsl(164 67% 51%)",
                        "hex": "#A48699"
                    },
                    {
                        "number": 4,
                        "hsl": "hsl(326 92% 42%)",
                        "hex": "#46B87E"
                    },
                    {
                        "number": 5,
                        "hsl": "hsl(98 62% 64%)",
                        "hex": "#627CC0"
                    },
                    {
                        "number": 6,
                        "hsl": "hsl(194 78% 44%)",
                        "hex": "#C29C84"
                    },
                    {
                        "number": 7,
                        "hsl": "hsl(157 52% 31%)",
                        "hex": "#9D685D"
                    },
                    {
                        "number": 8,
                        "hsl": "hsl(112 94% 44%)",
                        "hex": "#70BC84"
                    }
                ],
                "quantity": 8,
                "palette_css": "--color-1: hsl(124 54% 58%);\n--color-2: hsl(132 77% 51%);\n--color-3: hsl(164 67% 51%);\n--color-4: hsl(326 92% 42%);\n--color-5: hsl(98 62% 64%);\n--color-6: hsl(194 78% 44%);\n--color-7: hsl(157 52% 31%);\n--color-8: hsl(112 94% 44%);"
            },
            "display": {
                "display": "[{\"number\":1,\"hsl\":\"hsl(124 54% 58%)\",\"hex\":\"#7C6CAE\"},{\"number\":2,\"hsl\":\"hsl(132 77% 51%)\",\"hex\":\"#849A99\"},{\"number\":3,\"hsl\":\"hsl(164 67% 51%)\",\"hex\":\"#A48699\"},{\"number\":4,\"hsl\":\"hsl(326 92% 42%)\",\"hex\":\"#46B87E\"},{\"number\":5,\"hsl\":\"hsl(98 62% 64%)\",\"hex\":\"#627CC0\"},{\"number\":6,\"hsl\":\"hsl(194 78% 44%)\",\"hex\":\"#C29C84\"},{\"number\":7,\"hsl\":\"hsl(157 52% 31%)\",\"hex\":\"#9D685D\"},{\"number\":8,\"hsl\":\"hsl(112 94% 44%)\",\"hex\":\"#70BC84\"}]"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.