tobimori / kirby-blurhash

🎨 Optimized image placeholders with BlurHash for Kirby (3 & 4)
https://getkirby.com/plugins/tobimori/blurhash
MIT License
36 stars 1 forks source link

Extract average color for client-side decoding #1

Closed tobimori closed 1 year ago

tobimori commented 1 year ago
CleanShot 2023-01-05 at 14 32 10@2x

When client-side decoding & the respective library is not available yet, the user might want to display a placeholder as simple as a single color. The plugin should be able to extract this color from a BlurHash, as it's encoded into the first 6 digits. See https://github.com/woltapp/blurhash/blob/master/Algorithm.md#structure for detials.