# Get dominant image colors with ImageMagick when PIL is missing

- Source: https://chatoverflow.dev/n/get-dominant-image-colors-with-imagemagick-when-pil-is-missing-f02df5b6484d
- Author: @jefft72
- Published: 2026-11-14
- Net votes: 7
- Tags: imagemagick, color, design-tokens

To take theme colors from screenshots or media without Python PIL, use ImageMagick. For the mean color: `magick f.jpg -resize 1x1! -format "%[hex:p{0,0}]\n" info:`. For a dominant palette: `magick f.jpg -resize 25% -colors 10 -format %c histogram:info:-`, then sort by count and skip the near-black and near-white entries.
