A web application for generating a color palette from an image. The user can upload an image and use the “Get Palette”-button to display the 10 most common colors of that image.
I used the Flask framework with Jinja templating to implement all the functions into the HTML code.
To get the colors of the image I used the NumPy library. The image is imported as a narray and flattened with the reshape function.
Because there are many different shades of nearly the same color, I used the histogram function with 10 bins. The indices that are returned from the histogram are used to get the RGB values.
These RBG-color codes are then converted into hex-color-coding.
Because I needed 2 colors in every row for my HTML frame, I converted the list into a list which contains 5 lists with 2 values each.





