nuxt / image

Plug-and-play image optimization for Nuxt applications.
https://image.nuxt.com
MIT License
1.34k stars 270 forks source link

Feature request: add dominant color support #176

Open katerlouis opened 3 years ago

katerlouis commented 3 years ago

Especially when lazy-loading it is nice to have the dominant color as background of the layout-placeholder. Would be nice as an option for <nuxt-image> and <nuxt-picture> and maybe exposing the dominant color for other usage aswell.

possible solutions to get the dominant color:

If you agree on adding this to @nuxt/image, I'd like to develop and propose a concept to you guys :) Would need more understanding of the module and vision of the module.

dpschen commented 3 years ago

Not sure if that fits the purpose, but maybe interesting to know that sharp (the tool behind the static IPX provider) features an experimental option to access the dominant color (see https://sharp.pixelplumbing.com/api-input#stats -> dominant).

Obviously this wouldn't work for the other providers.

mrleblanc101 commented 1 year ago

@dpschen Is there are way to access this ?

dpschen commented 1 year ago

@dpschen Is there are way to access this ?

I don’t know. Haven‘t looked into this since then.