Dataczar
Browse helpers

Resolve a human-friendly color string into a canonical hex value.

Accepts hex literals, CSS color names, RGB/RGBA strings, or descriptive phrases (e.g., "warm blue", "light forest green"). The service normalizes modifiers (light/dark/bright) and returns a #rrggbb string so downstream image APIs can rely on consistent color inputs.

GETPOST/data-tools/color-string-to-hex

Parameters

Query Parameters

NameTypeDescription
valuestring · requiredColor text to resolve (hex, CSS name, rgb(), or descriptive phrase).
dryrunbooleanIf present, no side effects occur and the response is marked as dryrun (still shows the resolved value when possible).

All helper calls accept your Dataczar key via the ak query parameter. Need one? Create or copy a key on Dataczar Connect and drop it into each request.

Responses

Status 200

Color resolved successfully.

{
  "ok": true,
  "data": {
    "hex": "#2f4f4f",
    "input": "Dark Slate"
  },
  "meta": {
    "service": "data-tools/color-string-to-hex",
    "dryrun": false,
    "request_id": "req_123"
  }
}

Examples

Request

"GET /data-tools/color-string-to-hex?value=steel%20blue&ak=demo"

Response

{
  "ok": true,
  "data": {
    "hex": "#4682b4",
    "input": "steel blue"
  },
  "meta": {
    "dryrun": false
  }
}

Request

"POST /data-tools/color-string-to-hex"

Body

{
  "value": "warm lavender"
}

Response

{
  "ok": true,
  "data": {
    "hex": "#c484ff",
    "input": "warm lavender"
  },
  "meta": {
    "dryrun": false
  }
}

Test Contracts

[
  {
    "name": "css_name",
    "method": "GET",
    "params": {
      "value": "steel blue"
    },
    "expect": {
      "hex": "#4682b4"
    }
  },
  {
    "name": "descriptive_phrase",
    "method": "POST",
    "body": {
      "value": "light forest green"
    },
    "expect": {
      "hex": "#4caf50"
    }
  }
]

File uploads (multipart form-data)

Attach PDFs or images as multipart fields. We'll fill in the field names for you.

Files
file

Query parameters

Equivalent curl

Grab your Dataczar API key

Every helper runs with the same simple API key. Sign in (or create a free Dataczar account) at Dataczar Connect to issue keys in seconds, then drop the key into any `ak=` parameter and start shipping.

Tip: reuse the same key across these helpers, or rotate keys per project from the Connect dashboard.