// the find
jkher/BlazorPaletteGenerator
🌈 Sample .NET Blazor WASM application that allows users to extract color palettes from selected image (JPEG/PNG) 🚀
A Blazor WASM app that extracts color palettes from images by calling native C++ code compiled to WebAssembly via P/Invoke. The real point of the repo is demonstrating .NET 7's native dependency feature for Blazor WASM — the color palette use case is just a vehicle for that. Aimed at .NET developers curious about shipping C/C++ logic in the browser without JS interop gymnastics.
The C++ side uses a median-cut-style bucket approach for palette extraction, which is a solid algorithm choice — faster and more predictable than k-means for this use case. The P/Invoke wiring through Blazor's NativeFileReference mechanism is cleanly structured and makes a good reference implementation. A working GitHub Pages demo means you can see it run without cloning anything. The CI pipeline is minimal but functional.
Abandoned on .NET 7, which is out of support — anyone trying to build this today will hit Emscripten toolchain drift and possibly broken native dependency compilation. 4 stars, 0 forks, last push April 2023: this is a proof-of-concept that was never maintained. The palette algorithm is hardcoded with no exposed parameters (bucket count, color depth), so it's not reusable as-is. No tests for the C++ core at all — the color extraction logic has zero coverage.