Para desarrolladores

API de color

Convertí colores, generá paletas y obtené nombres y contraste por HTTP. Respuestas en JSON. Sin costo.

Acceso

Tier abierto: sin registro, hasta 300 llamadas por día por IP.

Con API key: registrate y generá una key en Mi cuenta › API para más cuota diaria. Mandala en el header X-Api-Key o como ?api_key=.

Endpoints

GET

https://www.cmyk.com.py/api/v1/convert.php

Convierte entre CMYK, RGB y HEX. Pasá uno de: hex, rgb, cmyk.

https://www.cmyk.com.py/api/v1/convert.php?hex=EC008C
https://www.cmyk.com.py/api/v1/convert.php?cmyk=100,0,0,0
https://www.cmyk.com.py/api/v1/convert.php?rgb=0,174,239
Ver respuesta
{
  "ok": true,
  "input": { "type": "hex", "value": "#EC008C" },
  "hex": "#EC008C",
  "rgb": { "r": 236, "g": 0, "b": 140 },
  "cmyk": { "c": 0, "m": 100, "y": 41, "k": 7 },
  "name": "Magenta vivo",
  "meta": { "tier": "anon", "remaining_today": 299 }
}

GET

https://www.cmyk.com.py/api/v1/palette.php

Genera una paleta de armonía. Parámetros: hex (requerido), type = complementary, analogous, triadic, tetradic, monochrome.

https://www.cmyk.com.py/api/v1/palette.php?hex=00AEEF&type=triadic

GET

https://www.cmyk.com.py/api/v1/name.php

Nombre aproximado del color y contraste contra blanco/negro (WCAG).

https://www.cmyk.com.py/api/v1/name.php?hex=1E3A8A

Notas

  • Las conversiones son referenciales (sin perfil ICC).
  • Códigos de error: 401 (key inválida), 422 (parámetro inválido), 429 (cuota agotada).
  • CORS habilitado (*), ideal para usar desde el navegador.