Pixel UI/Backgrounds/Liquid metal

Liquid metal

A chrome surface that ripples like mercury.

<piix-shader>WebGL
Palette

A height field shaded like polished metal, with sharp highlights sliding over it. In mono it is pure chrome; in a colour palette it turns into anodised metal.

Installation

<!-- once, anywhere on the page: every component -->
<script src="https://cdn.jsdelivr.net/npm/piixpal@0.6/piixpal.min.js"></script>

Usage

<piix-shader kind="liquid" height="420px"></piix-shader>

Examples

Behind your content

With fill it sits behind everything else in the element it's in. Give that element position: relative (the shader does this for you if it's static).

Ship it loud

Your content sits on top.

Other palettes

Every palette works with every background.

Smooth bands

dither="0" swaps the dither pattern for flat colour bands, like a poster.

API reference

AttributeWhat it doesDefault
kindmesh warp aurora crystal liquid horizon nebula topo dots firemesh
palettethe colours: lime aurora sunset ocean candy violet fire gameboy paper mono, or your own, dark to light: "#000,#6b4cff,#fff"mono
pixelsize of one pixel, in px4
dither0 for flat colour bands, 1 for full dither1
speed1 is normal, 0 holds still1
heightwhen not filling: px or any CSS length360px
fillsit behind the content of the parent element–

Accessibility