POST
/v1/color/similarity1 credit / callColor similarity
Compare two RGB hex colors using normalized Euclidean distance.
| Parameter | Type | Required | Description |
|---|---|---|---|
| first | string | Yes | First 3- or 6-digit hex color. |
| second | string | Yes | Second 3- or 6-digit hex color. |
Request
curl -X POST https://toolsonduty.com/api/v1/color/similarity \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{"first":"#ffffff","second":"#000000"}'Response
{
"ok": true,
"data": {
"distance": 441.673,
"similarity": 0,
"exactMatch": false
}
}