{"openapi":"3.1.0","info":{"title":"Color Toolkit","version":"0.1.0","description":"Color conversion, WCAG contrast, harmony schemes and nearest named color.","x-guidance":"Color conversion, WCAG contrast, harmony schemes and nearest named color. Each operation is an HTTP POST to its /v1/<operation> path with a JSON request body (see each operation's requestBody schema) and returns a JSON response. Endpoints are paid per successful call via x402 or MPP (USDC on Base); an unpaid request returns 402 with payment metadata in the WWW-Authenticate header.","contact":{"email":"hello@openverbs.com"}},"x-discovery":{"ownershipProofs":["0xb1401a71756f51464a9962db12f1eb3e9522490cd20010b06d00cf7b7770acfd5f79721f9dfdf2643f8cecd29af3bde9ec133941a386042b32d9886053a70de61b","0xc1c1f11793e18a00fcb7072421f26e89fb75b6aa517fa84370564991f4b10efa024f6f57e4e67eefd20cf46cc01fc5a62d793fa8fbcda04f26c946a3433d73f91b","0x676b474af0ef9ed4809b5d12d2e789b36e52d56215b21f601d71f76620e36ec630347116a7b2b349a3c3681e5db0fbfa76c4169a676b6d6f27864d0e5017284a1c","0xc2ab96522515ed9e9bc4f1a241b774bd48df42e951ddbf7f6aa8fc76f5a96a20421703e1ec402ce7eb1e4eabea3b6e4e4129cf39d56ea91cf4fcf38561fc94fc1c"]},"servers":[{"url":"https://color.openverbs.com"}],"paths":{"/health":{"get":{"summary":"Health check","security":[],"responses":{"200":{"description":"Healthy","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"service":{"type":"string"},"version":{"type":"string"}}}}}}}}},"/v1/convert":{"post":{"summary":"Convert color","description":"Parse any CSS color and return it as hex, rgb, hsl, hwb, lab, lch and oklch. Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["convert color","css color conversion","hex rgb hsl converter","oklch color conversion","parse css color","color format api"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"color":{"type":"string","minLength":1,"maxLength":128,"description":"Any CSS color (e.g. \"#3498db\", \"rebeccapurple\", \"hsl(204 70% 53%)\")."}},"required":["color"],"additionalProperties":false},"example":{"color":"#3498db"}}}},"responses":{"200":{"description":"The `hex` value and a `formats` map (rgb, hsl, hwb, lab, lch, oklch) as CSS strings.","content":{"application/json":{"schema":{"type":"object","description":"The `hex` value and a `formats` map (rgb, hsl, hwb, lab, lch, oklch) as CSS strings."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Parse any CSS color and return it as hex, rgb, hsl, hwb, lab, lch and oklch.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Parse any CSS color and return it as hex, rgb, hsl, hwb, lab, lch and oklch.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Parse any CSS color and return it as hex, rgb, hsl, hwb, lab, lch and oklch.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/contrast":{"post":{"summary":"WCAG contrast","description":"Compute the WCAG 2.1 contrast ratio between two colors and whether it passes AA/AAA. Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["wcag contrast check","color contrast ratio","accessibility color check","aa aaa contrast","foreground background contrast","text contrast api"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"foreground":{"type":"string","minLength":1,"maxLength":128,"description":"Text/foreground color."},"background":{"type":"string","minLength":1,"maxLength":128,"description":"Background color."}},"required":["foreground","background"],"additionalProperties":false},"example":{"foreground":"#ffffff","background":"#1f2937"}}}},"responses":{"200":{"description":"The contrast `ratio` and `aa`/`aaa` pass flags for `normal` and `large` text.","content":{"application/json":{"schema":{"type":"object","description":"The contrast `ratio` and `aa`/`aaa` pass flags for `normal` and `large` text."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Compute the WCAG 2.1 contrast ratio between two colors and whether it passes AA/AAA.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Compute the WCAG 2.1 contrast ratio between two colors and whether it passes AA/AAA.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Compute the WCAG 2.1 contrast ratio between two colors and whether it passes AA/AAA.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/scheme":{"post":{"summary":"Color scheme","description":"Generate a harmony scheme (complementary, analogous, triadic, tetradic, monochromatic) from a base color. Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["color scheme generator","generate color palette","color harmony scheme","complementary colors","analogous color palette","triadic color scheme"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"color":{"type":"string","minLength":1,"maxLength":128,"description":"Base color."},"type":{"type":"string","enum":["complementary","analogous","triadic","tetradic","monochromatic"],"description":"Harmony type."}},"required":["color","type"],"additionalProperties":false},"example":{"color":"rebeccapurple","type":"complementary"}}}},"responses":{"200":{"description":"The scheme `type`, the `base` hex and the generated `colors` as hex strings.","content":{"application/json":{"schema":{"type":"object","description":"The scheme `type`, the `base` hex and the generated `colors` as hex strings."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Generate a harmony scheme (complementary, analogous, triadic, tetradic, monochromatic) from a base color.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Generate a harmony scheme (complementary, analogous, triadic, tetradic, monochromatic) from a base color.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Generate a harmony scheme (complementary, analogous, triadic, tetradic, monochromatic) from a base color.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/nearest-named":{"post":{"summary":"Nearest named color","description":"Find the nearest CSS named color to a given color, by perceptual distance. Paid endpoint (x402 + MPP). Price: $0.002000 USDC per successful payment.","tags":["nearest named color","css color name lookup","find color name","color name matching","named css color","closest color name"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"color":{"type":"string","minLength":1,"maxLength":128,"description":"Any CSS color."}},"required":["color"],"additionalProperties":false},"example":{"color":"#3498db"}}}},"responses":{"200":{"description":"The nearest CSS `name`, its `hex` and the perceptual `distance` (0 = exact).","content":{"application/json":{"schema":{"type":"object","description":"The nearest CSS `name`, its `hex` and the perceptual `distance` (0 = exact)."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Find the nearest CSS named color to a given color, by perceptual distance.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"2000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Find the nearest CSS named color to a given color, by perceptual distance.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"2000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Find the nearest CSS named color to a given color, by perceptual distance.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}}},"x-service-info":{"categories":["compute"],"docs":{"homepage":"https://color.openverbs.com","apiReference":"https://color.openverbs.com/openapi.json"}}}