Color Detection

This is an entrypoint for automatic analysis of a website.

Created on Mon Apr 16 22:40:46 2018

@author: giulio

colorDetection.getColorsW3C(img, plot=False)

This functions is used to get a simplified color palette (W3C siteens basic colors).

F = 255 C0 = 192 80 = 128

  • img (numpy.ndarray) – image to analyze in RGB
  • plot (boolean) – whether to plot or not the results

percentage distribution of colors according to the W3C sixteens basic colors

Return type:

list of shape 16x2, where x[0] is the color name and x[1] the percentage of pixels most similar to that color in the image