28230 sujets
Bonjour,
Une possibilité en css pourrait être l'utilisation du filtre blur et de la transformation scale comme indiqué sur cet article :
https://medium.com/@rocchokcoco/how-to-extract-image-theme-color-by-css-eb0d278c14d
Un test rapide à améliorer : https://jsfiddle.net/gnxq5b34/
Tu peux aussi trouver d'autres solutions plus avancées en javascript et/ou via des bibliothèques, quelques liens en exemples :
https://dev.to/producthackers/creating-a-color-palette-with-javascript-44ip
https://github.com/thephpleague/color-extractor
https://jariz.github.io/vibrant.js/
https://briangonzalez.github.io/jquery.adaptive-backgrounds.js/
Une possibilité en css pourrait être l'utilisation du filtre blur et de la transformation scale comme indiqué sur cet article :
https://medium.com/@rocchokcoco/how-to-extract-image-theme-color-by-css-eb0d278c14d
Un test rapide à améliorer : https://jsfiddle.net/gnxq5b34/
Tu peux aussi trouver d'autres solutions plus avancées en javascript et/ou via des bibliothèques, quelques liens en exemples :
https://dev.to/producthackers/creating-a-color-palette-with-javascript-44ip
https://github.com/thephpleague/color-extractor
https://jariz.github.io/vibrant.js/
https://briangonzalez.github.io/jquery.adaptive-backgrounds.js/