Build a Color Extraction Tool with JavaScript

preview_player
Показать описание
In this video I explain how to use the HTML Canvas element to extract colour information from individual pixels as well as calculating the average colour over a range. Tools like this can be used when trying to generate a colour scheme from an image.

Playlist of videos about HTML5 Canvas:
Рекомендации по теме
Комментарии
Автор

I was looking for a way to get the average of the whole image and found a "just copy me" video 😅 now that one makes sense by your explanation.
Thanks!

Stoney_Eagle
Автор

Thanks! Now I can use this to identify colors in an image for a project!

NiIog
Автор

That's a cool looking little project!

pesahson
Автор

Great, thank you !!!
I would have declared the nums variable relative to the inset variable :
let nums =(inset+1)*(inset+1);

angladephil
Автор

So the "shape" or "coverage area" that is calculating the average color, is actually just a plus-sign, so to speak, left, right, up, and down, from the central mouse pixel, and not a square around the central mouse pixel. Because it's not gathering the colors of the pixels diagonal to the central mouse pixel. The square is just something easier to see for the user. Hopefully if I'm wrong you'll correct me.

BKofficer
Автор

it is possible to have 3 on click events on 3 different locations of the image when those locations are fixed in place.

WatcharaphanPongpan
Автор

Is it possible to implement this in react native because some elements are like web based so its not work in android how to achieve this in react native?

Akhilashok
Автор

Why the array index is multiplied by 4 to get the rgb value?

SnehaishChakrabortyLive
Автор

How to get the excraction automatically without click the color?

ZnR
visit shbcf.ru