API
Send a stateless JSON request to POST /api/tools/colour with a colour field containing a hexadecimal sRGB colour. The endpoint returns the colour details, WCAG contrast results, and generated palette.
curl -X POST https://oathompsonjones.co.uk/api/tools/colour \
-H 'Content-Type: application/json' \
-d '{"colour":"#1C7EEA"}'
Successful responses use the shared { success: true, data: ... } envelope. Invalid colours return a structured INVALID_COLOUR error. The interactive form accepts other formats and normalises them to hexadecimal before calling this endpoint.