Tea bowlLustre over indigo, slipped
ScallopNacre, secreted
KeyBrushed brass
Vinyl recordPressed vinyl, spiral cut
Drinking glassCoated crystal, 42 layers
Argope roseaFrom an uploaded image
Pearl buttonCut blank, four holes
Sweet wrapperMetallised film, flow-wrapped
Assay markStruck silver, aged
Mirrored gogglesInterference filter on polycarbonate
Number plateLuxembourg, acrylic over sheeting
Slumped dishCoated sheet, kiln-formed
Ace of spadesEtched steel, matte coat
Frosted bulletMica in wax, cast
Strand of pearlsNacreous, cultured
Mirror ballSilvered glass, on a carcass
Curled ribbonMetallised film, embossed
Pleated towerHolographic laminate, glazed
Cold canFrost on lacquered aluminium

Welcome to schiller.

Structural colour for the web, on anything you can draw.

About

Some colour isn’t paint. A soap bubble, the back of a CD, the inside of a shell: they get their colour from shape, not from pigment. schiller brings that to the browser.

Here’s the trick. Build a surface out of layers a few hundred nanometres thick, and light bouncing off the top of a layer meets light bouncing off the bottom. Some wavelengths cancel, some reinforce, and which ones survive depends on where you’re standing. Move, and the colour moves with you. Mineralogists call that flash schiller, after the blue that lives inside labradorite, and it seemed like the right name to borrow.

The library does the same thing in a shader and lays it over artwork you already have: an image, an SVG, a Three.js material. You never pick a colour. You pick a material, a finish named after the real thing it imitates, and the colours fall out of the physics. Then you give the viewer a light to move.

Everything on this page is live. Scroll the row and the sheen travels across each object as it passes under the one lamp. Click one and it opens. Hover any of them and the light is yours.

How it works
  1. Hand it a shape.An image, SVG markup, a canvas, or a Three.js material. It reads the silhouette and builds a distance field from it, so the grain knows which way the surface runs.
  2. Name the material.Nineteen finishes, each named for the thing it imitates: nacre, foil, brushed brass, the back of a disc. The optics are the preset. The colours are not.
  3. Move the light.A pointer, a scroll, a gyroscope, or nothing at all. Left alone it drifts on its own, and it respects anyone who asks for less motion.
Start

It’s one import, no build step, and nothing else to install. Three ways in, in the order you’ll probably want them.