I built an API that stops AI hallucinating colour
A new API called Colour Memory has been developed to help prevent AI from hallucinating colors. It matches hex color codes to named colors and provides a confidence score along with primary source information. This tool aims to enhance the accuracy of color representation in AI applications.
- ▪Colour Memory API matches hex codes to named colors.
- ▪It provides a confidence score and primary source information for each color.
- ▪The API includes guardrails to prevent misrepresentation of color data.
Opening excerpt (first ~120 words) tap to expand
2 Tool 1 of 3 query.hex Match any hex to the archive. Returns the nearest named colour with its primary source, confidence score, claim_role, and do_not_say guardrails. This is the core of what Colour Memory does. curl Copy curl -X POST https://api.colourmemory.com/query/hex \ -H "X-Api-Key: cm_demo_public_quickstart" \ -H "Content-Type: application/json" \ -d '{"hex": "#D4A829", "n_results": 1}' Response — key fields nameSong Gold Sycee archiveChina primary_sourceNorthern Song Dynasty monetary records, 960–1127 confidence0.92 claim_strengthA — Direct institutional record claim_roleanchor do_not_say Do not describe this hex as spectrophotometrically measured — values are computed from material descriptions.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Colourmemory.