I am trying to find the two colors from an image: the dominant one, and its complementary. From viewtopic.php?f=1&t=12878, I am able to get the dominant color using following command:
Code: Select all
convert img.png -colors 16 -depth 8 -format "%c" histogram:info:|sort -rn|head -n 1|grep -oe '#[^\s]*'
PS: I am not looking for exact values for colors.