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

auto-palette-wasm

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

2 unstable releases

0.4.0 Jun 7, 2024
0.3.0 May 19, 2024

#270 in WebAssembly

Download history 129/week @ 2024-05-13 46/week @ 2024-05-20 77/week @ 2024-06-03

252 downloads per month

MIT license

245KB
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

~2.5–3.5MB
~58K SLoC