I want to make the background of my website match the colors of the player like in YouTube but i don't know how. Does anyone have any ideas?
Asked
Active
Viewed 33 times
0
-
that's something your device does natively for youtube, ugly IMO.. to do it for the web your need to grab the primary thumbnail for the image [like](https://stackoverflow.com/questions/2068344/how-do-i-get-a-youtube-video-thumbnail-from-the-youtube-api), then get the average colour of the image [like](https://stackoverflow.com/questions/2541481/get-average-color-of-image-via-javascript) then add a css [box-shadow](https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow) on the div with that colour – Lawrence Cherone Dec 03 '22 at 13:09