# Color and Design Tools Exact color conversion, accessible text colors, palettes, mixing, color-blindness simulation and contrast fixes. ## How to pay Machine-payable over x402. USDC on: Base (eip155:8453), Solana (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp), Polygon (eip155:137), Arbitrum One (eip155:42161). No accounts. No API keys. No signup. The paying wallet is the account. ## Machine-readable - OpenAPI: https://color-design.x402tookit.com/openapi.json - x402 manifest: https://color-design.x402tookit.com/.well-known/x402 - Catalog (free): https://color-design.x402tookit.com/catalog - Health (free): https://color-design.x402tookit.com/health - Uptime (free): https://color-design.x402tookit.com/uptime ## Endpoints (8) ### GET /accessible-text-color — $0.02 Best text color (black or white) for a background hex color, with contrast ratios and WCAG AA/AAA results for both. Params: background: string Example: https://color-design.x402tookit.com/accessible-text-color?background=f4d03f ### GET /color-adjust — $0.02 Lighten, darken, saturate, desaturate or rotate the hue of a hex color by an exact number of HSL points. Params: color: string, lightness?: number, saturation?: number, hue?: number Example: https://color-design.x402tookit.com/color-adjust?color=3366cc&lightness=15&saturation=-10&hue=20 ### GET /color-blind-sim — $0.02 Simulate protanopia, deuteranopia and tritanopia on a color, or on a text/background pair with the contrast that remains. Params: color: string, background?: string Example: https://color-design.x402tookit.com/color-blind-sim?color=e74c3c&background=2ecc71 ### GET /color-convert — $0.02 Convert a hex color to RGB, HSL, HSV and CMYK with CSS strings and relative luminance, exactly. Params: color: string Example: https://color-design.x402tookit.com/color-convert?color=ff8800 ### GET /color-mix — $0.02 Mix two hex colors at a ratio in sRGB or in linear light (physically correct), returning the blended hex. Params: a: string, b: string, weight_b?: number, space?: string Example: https://color-design.x402tookit.com/color-mix?a=ff0000&b=0000ff&weight_b=0.5&space=srgb ### GET /contrast-fix — $0.02 Adjust a text color's lightness just enough to reach a WCAG contrast target (4.5, 3 or 7) on a background, keeping its hue. Params: foreground: string, background: string, target?: number Example: https://color-design.x402tookit.com/contrast-fix?foreground=ffcc00&background=ffffff&target=4.5 ### GET /gradient-steps — $0.02 Evenly spaced color steps between two hex colors, in sRGB or linear light, for charts, heatmaps and gradients. Params: from: string, to: string, steps?: integer, space?: string Example: https://color-design.x402tookit.com/gradient-steps?from=fff5eb&to=7f2704&steps=7&space=srgb ### GET /palette-generate — $0.02 Generate a color palette from a base hex color: complementary, analogous, triadic, tetradic, split-complementary or monochrome. Params: base: string, scheme?: string Example: https://color-design.x402tookit.com/palette-generate?base=3366cc&scheme=triadic ## Terms Color results are computed locally from the values you supply with standard formulas (sRGB, WCAG 2.x, Machado 2009), provided as is. Color-blindness simulation approximates how colors may look and is not a substitute for testing with people.