MCPcopy Create free account
hub / github.com/pollinations/pollinations / renderSolidIcon

Function renderSolidIcon

tools/icons/src/render.js:63–65  ·  view source on GitHub ↗
(svg, size, { bg, logoColor, fraction = 0.62 })

Source from the content-addressed store, hash-verified

61
62/** apple-touch / maskable icon: padded logo on a solid (opaque) background. */
63export function renderSolidIcon(svg, size, { bg, logoColor, fraction = 0.62 }) {
64 return compose(svg, { width: size, bg, logoColor, fraction });
65}
66
67// Tint an SVG and rasterize it to fit within w×h (transparent); return {buf,w,h}.
68async function rasterize(svg, color, w, h) {

Callers 2

render.test.jsFile · 0.90
generateFunction · 0.90

Calls 1

composeFunction · 0.85

Tested by

no test coverage detected