Skip to content

About

A port of Lunar Labs' Dither Machine for the web

Resources

Stars

2 stars

Watchers

1 watching

Forks

Repository files navigation

Lunar Labs Dither Machine (web port)

Try it out online!

This is a JavaScript/HTML port of the wonderful Dither Machine by Lunar Labs. Dither Machine is a Unity project to create dithered gradients. It was released as open source in 2019.

The original Dither Machine on Github. The core code is in DitherEditor.cs and Dither.cs.

This port is a React app running with Vite. It was created with the Vite React quickstart template.

I referenced this helpful article for working with <canvas> in React.

Features

A few features from the original Unity app are incomplete.

  • Linear gradients
    • Changing the gradient angle
  • Radial gradients
    • Changing the gradient offset
    • Changing the gradient scale
  • Paste-in image to dither
  • Bayer dither patterns
  • Image-mask dither patterns
  • Rotating the dither mask
  • Editable colors
  • Changing the number of dither steps
  • Changing color percentages in the gradient
    • Equalizing the color percentages
  • Swapping color palettes (gameboy, amber, CMYK, rainbow, etc)
  • Exporting images
  • Changing the canvas size
  • View the undithered gradient in black and white

Other possible improvements

  • save your custom color palette for later
  • paste in a hex value to change the color
  • able to type in all input fields next to sliders

About

A port of Lunar Labs' Dither Machine for the web

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages