Newton's Unicorn

Saved games stay in this browser only.

About the game

Newton had a prism; you have a unicorn. In Newton's Unicorn the sky has lost its colours, and the horn of your unicorn is the only light source: it shoots a beam of white light that you steer through prisms, mirrors, filters and raindrops to bring colour back to grey flowers.

Each flower shows a thin ring in the colour it needs, and it only counts when it is lit with exactly that colour. White is not enough for a red flower, because white light still contains the other six bands. So you split the beam with a prism, pick out the band you need and send it to the right flower. The rainbow is never drawn as an image: every coloured ray is calculated live with Snell's law, using a different refractive index for each wavelength. The final level reproduces a real rainbow, with sunlight entering a single raindrop and the colours coming out at about 42 degrees.

mxingweb made the game for js13kGames 2026, where the whole game had to fit in 13 KB. There are twelve levels, about five to eight minutes in all, and the sound effects come from a ZzFX-derived generator.

Playing it here

Click Play, then click or tap the title screen to begin. Bright pieces with a breathing outline can be moved and turned; greyed, bolted pieces are fixed and shake when you try them. Dropping a piece close to a working position snaps it into place, and when a correct setup is held for half a second the level is solved. Continue with Enter or a click. Nothing is saved between visits.

Controls

Input Action
click or tap, drag select and move a piece
drag the ring, mouse wheel, left / right arrows or Q / E rotate a piece (Shift for fine steps)
drag the ring on the horn tip aim the unicorn
R reset the level
M sound on / off
Esc title screen
Enter or click next level after a solve

A few things worth knowing

White is not a colour. If a flower needs red, put a prism in the way and aim only the red band at it.

Hold a setup steady. A correct arrangement has to stay lit for a moment, so let go of the piece and wait.

On a phone, turn it sideways. The game rotates itself when held upright.

Credits and licence

Newton's Unicorn was created by mxingweb and is released under the MIT licence. The sound effects generator is derived from ZzFX by Frank Force (MIT). The licence texts are linked from this page.