Text2Color

Text2Color

Convert natural language text descriptions to HEX, RGB, and CMYK colour codes.
                  {
  "color_description": "haunted house",
  "hex_code": "#624a4c",
  "cmyk": [
    0,
    24,
    22,
    61
  ],
  "rgb": [
    98,
    74,
    76
  ]
}
              

Response example. If you want to see more check the documentation.

How This API Works

This API converts text descriptions of colors into various color formats. It uses advanced natural language processing to interpret color descriptions and generate accurate color values. The API will always return a color, even if the input is vague.

Sending a Request

To send a request, make a GET call to the appropriate endpoint with your color description as a URL-encoded parameter. The API supports converting to HEX, RGB, CMYK, and all formats combined.

Endpoints

  • /hex/{color_description} - Returns HEX color code
  • /rgb/{color_description} - Returns RGB values
  • /cmyk/{color_description} - Returns CMYK values
  • /color/{color_description} - Returns all color formats

Example Requests

GET /hex/sky%20blue
GET /rgb/deep%20forest%20green
GET /cmyk/bright%20sunny%20yellow
GET /color/rich%20burgundy%20red

Response Format

The API returns JSON responses. For single format requests, you'll receive a simple key-value pair. For the /color endpoint, you'll get an object with all supported formats.

Error Handling

The API uses standard HTTP status codes. A 200 status indicates success, while 4xx codes signify client errors (e.g., invalid input), and 5xx codes indicate server errors.

Security

All requests must include a valid API key in the header. Please keep your API key secure and do not share it publicly.

Support

For additional help or to report issues, please contact our support team or refer to the detailed documentation.