Skip to main content
Glama
parseHwb.js751 B
import { Tok } from '../parse.js'; function ParseHwb(color, parsed) { if (!parsed || parsed[0] !== 'hwb') { return undefined; } const res = { mode: 'hwb' }; const [, h, w, b, alpha] = parsed; if (h.type !== Tok.None) { if (h.type === Tok.Percentage) { return undefined; } res.h = h.value; } if (w.type !== Tok.None) { if (w.type === Tok.Hue) { return undefined; } res.w = w.type === Tok.Number ? w.value : w.value / 100; } if (b.type !== Tok.None) { if (b.type === Tok.Hue) { return undefined; } res.b = b.type === Tok.Number ? b.value : b.value / 100; } if (alpha.type !== Tok.None) { res.alpha = alpha.type === Tok.Number ? alpha.value : alpha.value / 100; } return res; } export default ParseHwb;

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MatheusgVentura/Project-One'

If you have feedback or need assistance with the MCP directory API, please join our Discord server