Real-time sampling of video color palette
This demo shows how to sample the current video frame color palette.
It uses color-thief to grab the current frame to a canvas and sample the colors.
It then uses the "Name that color" library by Chirag Mehta to display the color name.
In this demo, 3 colors are sampled every 500ms but you can easily change these values.
A note about security
If you want to sample a video file from another domain, you need to verify the following:- Add the attribute
crossOrigin ="anonymous"
to your video tag - For some browsers you will also need to set CORS headers on your video files
Demo
Click the "Play" button to start.