#color-palette #palette #image #wasm-bindings #color

auto-palette-wasm

🎨 A WebAssembly binding for auto-palette, allowing it to automatically extract color palettes from images

2 unstable releases

0.5.0 Aug 13, 2024
0.4.0 Jun 7, 2024
0.3.0 May 19, 2024

#237 in WebAssembly

MIT license

250KB
6K SLoC

auto-palette-wasm

A WebAssembly binding for auto-palette, allowing it to automatically extract color palettes from images.

Development

Run unit tests

cargo nextest run --tests --package auto-palette-wasm

Run wasm-pack tests

Run wasm-pack tests in headless mode using Chrome:

wasm-pack test --headless --chrome ./crates/auto-palette-wasm

Run wasm-pack tests in headless mode using Firefox:

wasm-pack test --headless --firefox ./crates/auto-palette-wasm

[!TIP] Before running the tests, make sure to install the latest version of Chrome Driver or Gecko Driver. If you're using macOS, you can install the drivers using Homebrew:

brew install chromedriver
brew install geckodriver

Build the WebAssembly module

wasm-pack build ./crates/auto-palette-wasm --release --target web

Dependencies

~3–4.5MB
~67K SLoC