Garment color match
POST /v1/color/garment · $0.01 a call
Send a photo of a clothing item and the wearer's season from the color API. A vision model finds the garment's main colors and marks a clean patch of each. Truelens measures those colors from the pixels, converts them to CIELAB, and finds the closest color to wear and the closest color to avoid in the season's fixed palette. The verdict comes from those distances, so the same photo always gets the same answer.
For styling and outfit apps, wardrobe apps, shopping assistants.
Request
Send the photo as image (multipart), image_base64 or image_url, as described in the overview. These fields go alongside it:
| Field | Type | Description |
|---|---|---|
season | one of light_spring, warm_spring, bright_spring, light_summer, cool_summer, soft_summer, soft_autumn, warm_autumn, deep_autumn, deep_winter, cool_winter, bright_winter, required | The wearer's color season id, as returned by the color API. |
Photo tips. Lay the item flat or hang it in daylight from a window, filling most of the frame. No flash, no filter. JPEG gives measured colors; other formats fall back to estimates.
curl https://truelens.keronlabs.com/v1/color/garment \
-H "Authorization: Bearer $TRUELENS_KEY" \
-F image=@portrait.jpg \
-F season="soft_autumn"
Response
| Field | Description |
|---|---|
summary | One line, e.g. "Great for Soft Autumn: teal blue, close to Teal". |
verdict | great, good, okay or avoid, for the garment's main color. |
season | The season id and name the garment was judged for. |
garment | What the garment is, in a few words. |
closest_best | The nearest color to wear in the palette (best colors and neutrals): name, hex and delta_e, the color distance. |
closest_avoid | The nearest color to avoid: name, hex and delta_e. |
advice | One plain sentence on how to wear it. |
colors[] | Each main color: name, hex, lab, share of the garment, measured (false when it is an estimate), verdict and its closest best and avoid colors. |
quality | ok is false when the colors are estimates or the light had a cast; warnings says why. |
Example
Output of this API’s own code on a sample photo. Values will differ for your photos.
{
"metadata": {
"id": "req_9cf4da08fe7f40dab71a",
"engine": "color/garment",
"status": "success",
"cached": false,
"credits_used": 1,
"created_at": "2026-10-19T09:30:00.000Z",
"processing_ms": 3400
},
"summary": "Okay for Soft Autumn: teal blue, close to Soft teal",
"verdict": "okay",
"season": {
"id": "soft_autumn",
"name": "Soft Autumn"
},
"garment": "knitted crew neck sweater",
"closest_best": {
"name": "Soft teal",
"hex": "#5f9590",
"delta_e": 28.3
},
"closest_avoid": {
"name": "Black",
"hex": "#111111",
"delta_e": 46.7
},
"advice": "This teal blue is neither a Soft Autumn color nor one to avoid, so wear it away from the face or with soft teal up top.",
"colors": [
{
"name": "teal blue",
"hex": "#3a6e91",
"lab": {
"L": 44.4,
"a": -6.4,
"b": -24.4
},
"share": 0.75,
"measured": true,
"verdict": "okay",
"closest_best": {
"name": "Soft teal",
"hex": "#5f9590",
"delta_e": 28.3
},
"closest_avoid": {
"name": "Black",
"hex": "#111111",
"delta_e": 46.7
}
},
{
"name": "light gray",
"hex": "#d8d6da",
"lab": {
"L": 85.9,
"a": 1.4,
"b": -1.7
},
"share": 0.2,
"measured": true,
"verdict": "great",
"closest_best": {
"name": "Oyster",
"hex": "#e8dfd0",
"delta_e": 10.7
},
"closest_avoid": {
"name": "Icy blue",
"hex": "#d6ecff",
"delta_e": 12.8
}
}
],
"quality": {
"ok": true,
"warnings": []
}
}