Skip to content

getPaletteBlurBackground

function getPaletteBlurBackground(palette): string | undefined;

Defined in: packages/asset-client/src/palette.ts:157

Build a multi-radial-gradient CSS background string from the palette swatches. Acts as a zero-extra-bytes alternative to the WebP LQIP: the palette is already in the DTO, so this placeholder costs nothing extra to ship. Renders as a smooth abstract “color cloud” reminiscent of the source image’s vibe.

Strategy: anchor 4 radial gradients at fixed corners using vibrant/muted pairs, layered over the dominant fill. Skips missing swatches gracefully.

Parameter Type
palette | AssetPalette | null | undefined

string | undefined