MCPcopy Create free account
hub / github.com/SpaceZephyr/myskill / extractAlpha

Function extractAlpha

pptx/scripts/html2pptx.js:272–277  ·  view source on GitHub ↗
(rgbStr)

Source from the content-addressed store, hash-verified

270 };
271
272 const extractAlpha = (rgbStr) => {
273 const match = rgbStr.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
274 if (!match || !match[4]) return null;
275 const alpha = parseFloat(match[4]);
276 return Math.round((1 - alpha) * 100);
277 };
278
279 const applyTextTransform = (text, textTransform) => {
280 if (textTransform === 'uppercase') return text.toUpperCase();

Callers 2

parseInlineFormattingFunction · 0.85
extractSlideDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected