# phpman > man > ppmhist(1)

> **TLDR:** Print a histogram of the colors present in a PPM image.
>
- Generate the histogram for human reading:
  `ppmhist {{-nom|-nomap}} {{path/to/image.ppm}}`
- Generate a PPM file of the colormap for the image, with the color histogram as comments:
  `ppmhist {{-m|-map}} {{path/to/image.ppm}}`
- Display version:
  `ppmhist {{-v|-version}}`

*Source: tldr-pages*

---

[ppmhist(1)](https://www.chedong.com/phpMan.php/man/ppmhist/1/markdown)                             General Commands Manual                            [ppmhist(1)](https://www.chedong.com/phpMan.php/man/ppmhist/1/markdown)



## NAME
       ppmhist - print a histogram of a portable pixmap


## SYNOPSIS
       **ppmhist** [**-hexcolor**] [**-noheader**] [**-map**] [**-nomap**] [**-sort=**{**frequency**,**rgb**}] [_ppmfile_]


## DESCRIPTION
       Reads a PPM image as input.  Generates a histogram of the colors in the image, i.e. a list of
       all the colors and how many pixels of each color are in the image.


## OPTIONS
### -sort=
              The **-sort** option determines the order in which the colors are listed  in  the  output.
              **frequency** means to list them in order of how pixels in the input image have the color,
              with the most represented colors first.  **rgb** means to sort them first by the intensity
              of  the red component of the color, the of the green, then of the blue, with the least
              intense first.

              The default is **frequency**.


### -hexcolor
              Print the color components in hexadecimal.  Default is decimal.

### -noheader
              Do not print the column headings.

### -map
              ments.

### -nomap



## SEE ALSO
       [**ppm**(5)](https://www.chedong.com/phpMan.php/man/ppm/5/markdown), [**pgmhist**(1)](https://www.chedong.com/phpMan.php/man/pgmhist/1/markdown), [**ppmtomap**(1)](https://www.chedong.com/phpMan.php/man/ppmtomap/1/markdown), [**pnmhistmap**(1)](https://www.chedong.com/phpMan.php/man/pnmhistmap/1/markdown), [**ppmchange**(1)](https://www.chedong.com/phpMan.php/man/ppmchange/1/markdown)


## AUTHOR
       Copyright (C) 1989 by Jef Poskanzer.



                                          17 September 2000                               [ppmhist(1)](https://www.chedong.com/phpMan.php/man/ppmhist/1/markdown)
