{"schema_version":"1.0","name":"colour-memory","display_name":"Colour Memory","description":"Colour intelligence API. 12,921 colours across 26 archives -- Shakespeare to Qing dynasty. Returns named archive colours with cultural provenance, material integrity (Pigment/Dye/Lake), physics (LRV, TAI, Bradford illuminant shifts), WCAG accessibility, colour blindness simulation, harmonies, and room specification. The only API that tells you whether a colour will fade, offend, or fail.","version":"2.0.0","contact":{"name":"Digby Oldridge / PR Eye Ltd","url":"https://www.colourmemory.com","email":"digby@prphotographer.co.uk"},"base_url":"https://colour-memory-api-production.up.railway.app","tools":[{"name":"query_hex","description":"Match any hex colour against 12,921 archive entries using CIEDE2000. Returns named historical colours with provenance, nearest RAL, physics (LRV, TAI, illuminant shifts), cultural intelligence, material integrity (Pigment/Dye/Lake), and WCAG accessibility. Use this when you have a specific colour value to identify or enrich.","input_schema":{"type":"object","properties":{"hex":{"type":"string","description":"6-digit hex colour code, with or without #. Example: '#3A5C8C' or '3A5C8C'"},"n_results":{"type":"integer","description":"Number of archive matches to return (1-20). Default 5.","default":5},"archive":{"type":"string","description":"Optional: restrict to one archive. Options: British, Shakespeare, WernerSyme, China, Pigment, Japan, France, Germany, Italy, Spain, Australia, Brazil, India, Korea, Morocco, Nigeria, Norway, Denmark, Finland, Netherlands, Mexico, Sweden, Switzerland, USA, SpaceStars, Oxfordshire"}},"required":["hex"]},"output_description":"nearest_colours array with name, archive_source, hex, dE2000, primary_source, colour_notes, nearest_ral, material_integrity (classification/stability/warning), archive_trace flag. Plus physics (lrv, tai, illuminant_shifts), cultural_significance, colour_cultural_intelligence.","http":{"method":"POST","path":"/query/hex","content_type":"application/json"}},{"name":"query_conceptual","description":"Ask any colour question in natural language. Returns archive-grounded prose response plus matched entries. Auto-detects query intent to return the right number of results (1 for single-colour questions, 3 for conversational, 5 for palettes, 6 for exploration). Use for: 'what colour did Chinese emperors wear', 'colour of grief in Elizabethan tradition', 'blue pigment discovered by accident', 'palette for a high-end interior'.","input_schema":{"type":"object","properties":{"query":{"type":"string","description":"Natural language colour question or request"},"n_results":{"type":"integer","description":"Override auto-detected result count (1-20)","default":5},"archive":{"type":"string","description":"Optional: restrict search to one archive"}},"required":["query"]},"output_description":"response (prose string from Claude), archive_entries (matched colours with full metadata), n_results (actual count used), search_method.","http":{"method":"POST","path":"/query/conceptual","content_type":"application/json"}},{"name":"specify_palette","description":"Generate a complete room specification from a palette of hex values. Returns 60-30-10 surface assignments (ceiling, walls, joinery, accents), layering sequence (step-by-step instruction), orientation advice (north/south facing), floor compatibility, and material warnings. Use when a user has chosen colours and needs to know how to apply them to a room.","input_schema":{"type":"object","properties":{"colours":{"type":"array","items":{"type":"string"},"description":"Array of hex colour codes. 2-8 colours. Example: ['#3A5C8C','#E2D8C8','#1B1556']"},"room_type":{"type":"string","description":"Room context for specification. Options: living, bedroom, kitchen, bathroom, office, exterior","default":"living"},"style":{"type":"string","description":"Optional style context: minimal, maximalist, heritage, contemporary"}},"required":["colours"]},"output_description":"surface_assignments (ceiling/walls/joinery/accents with hex, name, proportion, note), layering_sequence (ordered steps), orientation_advice, floor_compatibility, colour_profiles (full physics per colour), material_warnings.","http":{"method":"POST","path":"/specify","content_type":"application/json"}},{"name":"get_harmonies","description":"Find archive-grounded colour harmonies in perceptually uniform LCh space. Returns named historical colours as harmonic partners -- not hex codes, named archive entries. Complementary, analogous, triadic, split-complementary. Use when a user wants to know what colours work with a given colour.","input_schema":{"type":"object","properties":{"hex":{"type":"string","description":"Input colour hex code"},"types":{"type":"array","items":{"type":"string","enum":["complementary","analogous","triadic","split_complementary","tetradic"]},"description":"Harmony types to return","default":["complementary","analogous","triadic"]}},"required":["hex"]},"output_description":"harmonies object keyed by type, each containing archive_match (name, archive_source, hex), target_hex (mathematical target), angle, description.","http":{"method":"POST","path":"/harmonies","content_type":"application/json"}},{"name":"get_physics","description":"Full colour physics profile for any hex value. LRV (Light Reflectance Value), TAI (Thermal Absorption Index), LEED classification, illuminant shifts under D65/A/F11 via Bradford CAT, Substrate Variance Index across 10 finish types, pigment advisory. All calculated from CIE Lab -- labelled as indicative, not spectrophotometric. Use for architectural specification, material selection, or thermal performance queries.","input_schema":{"type":"object","properties":{"hex_val":{"type":"string","description":"6-digit hex without #. Example: 1B1556"},"zone":{"type":"string","description":"Optional colour zone for pigment advisory: Blue, Red, Green, Yellow, Orange, Violet, Neutral, Grey"}},"required":["hex_val"]},"output_description":"lrv, tai, lrv_band, thermal_class, illuminant_shifts (D65/A/F11 hex values), substrate_variance (10 finish multipliers), pigment_class, pigment_advisory (lightfastness, alkali_risk, recommendation), methodology.","http":{"method":"GET","path":"/physics/{hex_val}"}},{"name":"accessibility_check","description":"WCAG 2.1 accessibility report for a colour against a background. Returns contrast ratio, AA/AAA pass/fail for normal and large text, recommended text colour (black or white), EU Accessibility Act reference. Use for digital product design, UI specification, or accessibility compliance checking.","input_schema":{"type":"object","properties":{"hex_val":{"type":"string","description":"Foreground colour hex without #"},"background":{"type":"string","description":"Background colour hex without #. Default FFFFFF (white)","default":"FFFFFF"}},"required":["hex_val"]},"output_description":"contrast_ratio, AA_normal, AA_large, AAA_normal, AAA_large (all boolean), recommended_text (#000000 or #FFFFFF), eu_accessibility_act note.","http":{"method":"GET","path":"/accessibility/{hex_val}"}},{"name":"simulate_colour_blindness","description":"Simulate how a colour appears to people with colour vision deficiency. Returns hex values for protanopia (red-blind, ~1% of men), deuteranopia (green-blind, ~6% of men), and tritanopia (blue-blind, ~0.01%). Brettel-Viénot-Mollon (1997) algorithm. Use for inclusive design, accessibility review, or brand colour safety checking.","input_schema":{"type":"object","properties":{"hex_val":{"type":"string","description":"Colour hex without #"}},"required":["hex_val"]},"output_description":"protanopia, deuteranopia, tritanopia -- each with hex and prevalence. methodology citation.","http":{"method":"GET","path":"/simulate/{hex_val}"}},{"name":"brand_match","description":"Find the nearest Farrow & Ball or Little Greene paint colour for any hex value. Returns named paint colours with RGB distance. Use when a user wants to buy a physical paint that matches a colour found in the archive.","input_schema":{"type":"object","properties":{"hex_val":{"type":"string","description":"Hex colour without #"},"brand":{"type":"string","description":"Optional brand filter: 'Farrow' or 'Little Greene'. Omit for all brands."},"n":{"type":"integer","description":"Number of matches to return (1-10)","default":3}},"required":["hex_val"]},"output_description":"matches array with name, brand, hex, rgb_distance. total_paint_colours count.","http":{"method":"GET","path":"/brand-match/{hex_val}"}},{"name":"get_colour_card","description":"Get a branded PNG colour card for any hex value. Returns image URL. Card shows: full colour background, nearest archive name, LRV, archive source, colourmemory.com watermark. Use when a user wants to share or download a single colour.","input_schema":{"type":"object","properties":{"hex_val":{"type":"string","description":"Hex colour without #"}},"required":["hex_val"]},"output_description":"PNG image stream. Filename includes archive name and timestamp.","http":{"method":"GET","path":"/colour-card/{hex_val}"}},{"name":"health_check","description":"API health status. Returns archive counts, search method (embedding or tfidf), total colours loaded, taste model status.","input_schema":{"type":"object","properties":{}},"output_description":"status, total_colours, archives (count per archive), search_method, taste_model_status.","http":{"method":"GET","path":"/health"}}],"privacy":{"image_storage":"Images are processed in memory and never stored or logged. Only extracted colour values are retained.","client_side_option":"colour-memory-extract.js available at https://github.com/DigbyO/colour-memory-api/blob/main/colour-memory-extract.js for browser-side extraction -- image never leaves the device."},"capabilities":{"archives":26,"total_colours":12921,"colour_spaces":["sRGB","CIE Lab","LCh","CIE XYZ"],"matching":["CIEDE2000","RGB distance"],"illuminants":["D65","A_2856K","F11_4000K"],"cultural_regions":["China","Japan","Korea","India","Islamic","Western","Ireland","Netherlands","Thailand","Brazil","Africa"],"material_classification":["Pigment","Dye","Lake"],"accessibility_standards":["WCAG 2.1 AA","WCAG 2.1 AAA","EU Accessibility Act 2025"],"cvd_types":["protanopia","deuteranopia","tritanopia"]}}