Skip to main content
Glama
parseLch.js685 B
import { Tok } from '../parse.js'; function parseLch(color, parsed) { if (!parsed || parsed[0] !== 'lch') { return undefined; } const res = { mode: 'lch' }; const [, l, c, h, alpha] = parsed; if (l.type !== Tok.None) { if (l.type === Tok.Hue) { return undefined; } res.l = l.value; } if (c.type !== Tok.None) { res.c = Math.max( 0, c.type === Tok.Number ? c.value : (c.value * 150) / 100 ); } if (h.type !== Tok.None) { if (h.type === Tok.Percentage) { return undefined; } res.h = h.value; } if (alpha.type !== Tok.None) { res.alpha = alpha.type === Tok.Number ? alpha.value : alpha.value / 100; } return res; } export default parseLch;

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