Skip to main content
Glama
convertHwbToRgb.js523 B
/* HWB to RGB converter -------------------- References: * https://drafts.csswg.org/css-color/#hwb-to-rgb * https://en.wikipedia.org/wiki/HWB_color_model * http://alvyray.com/Papers/CG/HWB_JGTv208.pdf */ import convertHsvToRgb from '../hsv/convertHsvToRgb.js'; export default function convertHwbToRgb({ h, w, b, alpha }) { // normalize w + b to 1 if (w + b > 1) { let s = w + b; w /= s; b /= s; } return convertHsvToRgb({ h: h, s: b === 1 ? 1 : 1 - w / (1 - b), v: 1 - b, alpha: alpha }); }

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