{"uid":"cap_e2IV6u8TztgslajOYElrT","slug":"httpay-xyz-eb0f3a27","name":"httpay.xyz Color Converter","description":"Convert a hex color code to RGB and HSL values. Pass ?hex=FF5733 (with or without #). Returns r, g, b, h, s, l values and CSS strings. Uses Node.js built-in math. Zero external dependencies.","url":"https://httpay.xyz/api/color-convert","method":"POST","headers":{},"bodySchema":null,"responseSchema":{"type":"json","example":{"description":"Convert a hex color code to RGB and HSL values. Pass ?hex=FF5733 (with or without #). Returns r, g, b, h, s, l values and CSS strings. Uses Node.js built-in math. Zero external dependencies."}},"example":{"request":{"hex":"#FF5733"},"response":{"css":{"hex":"#FF5733","hsl":"hsl(11, 100%, 60%)","rgb":"rgb(255, 87, 51)"},"hex":"#FF5733","hsl":{"h":11,"l":60,"s":100},"rgb":{"b":51,"g":87,"r":255},"meta":{"x402":true,"poweredBy":"Alfred Zhang 🫡"},"input":"#FF5733","isDark":false,"source":"Node.js built-in math","brightness":133,"convertedAt":"2026-06-12T03:58:22.404Z"}},"exampleRequest":{"hex":"#FF5733"},"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_mtP-n1FVMdRAdmMlUYxc-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a hex color code to RGB and HSL values, returning numeric components and CSS-ready strings","exampleAgentPrompt":"Convert the hex color #FF5733 to its RGB and HSL values so I can use it in my CSS stylesheet.","exampleUseCases":null,"resultDescription":"Returns numeric r, g, b values (0-255 range), h (0-360), s and l (0-100 percentage), plus formatted CSS strings like rgb(255, 87, 51) and hsl(11, 100%, 60%) ready for use in stylesheets.","failureModes":["Invalid or malformed hex code returns an error","Missing ?hex parameter causes a bad request response","Hex code with unsupported format (e.g. 3-digit shorthand ambiguity) may not parse correctly"],"whenToPreferThis":"Use this endpoint when you need a lightweight, zero-dependency, instant hex-to-RGB/HSL conversion without importing a full color library. Ideal for agents building CSS, design tools, or any workflow that needs to decompose a hex color into its numeric or CSS-string components on the fly.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:54:35.981Z","isFirstParty":false}