{
    "mode": "man",
    "parameter": "pamgetcolor",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/pamgetcolor/1/json",
    "generated": "2026-08-23T18:29:21Z",
    "synopsis": "pamgetcolor  [-format  format]  [-radius radius] [-linear] [-infile pamfile] region1 [region2\n...]",
    "sections": {
        "NAME": {
            "content": "pamgetcolor - display the average colors from specified regions in an image.\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "pamgetcolor  [-format  format]  [-radius radius] [-linear] [-infile pamfile] region1 [region2\n...]\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This program is part of Netpbm(1).\n\npamgetcolor prints the average colors of a set of circular regions in the input image.\n\nYou specify a region as a positional argument of the form  column,row[:label],  where  column\nand  row are the coordinates of the center of the circle (first row of pixels is row 0; left‐\nmost column of pixels is column 0), and label an optional label that pamgetcolor  shall  dis‐\nplay  to  identify  that region in its output.  All regions have he same radius, specified by\nthe -radius option.  The region centers must lie within the image, but part of a  region  may\nfall  outside the image; pamgetcolor considers only the part that is within the image in cal‐\nculations.\n\n\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "To read the color of the pixel at location (10,14) in the default format:\n\npamgetcolor 10,14 -infile test.ppm\n\n\nTo read the colors of three pixels in the default format, assigning a label to each pixel:\n\npamgetcolor 10,10:topleft 100,100:middle 200,200:bottomright -infile test.ppm\n\n\nTo read with 16-bit precision the average color in the circle with a radius  of  four  pixels\nand the center at (100,100):\n\npamgetcolor -format int:65535 -radius 4 100,100 -infile test.ppm\n\n\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "In  addition  to  the options common to all programs based on libnetpbm (most notably -quiet,\nsee \u001b]8;;index.html#commonoptions\u001b\\ Common Options\u001b]8;;\u001b\\ ), pamgetcolor recognizes the following command line options:\n\n\n\n",
            "subsections": [
                {
                    "name": "-format",
                    "content": "This specifies the format in which to output the  colors.   The  output  is  always  a\n\u001b]8;;libppm.html#colorname\u001b\\Netpbm color specification\u001b]8;;\u001b\\ ; this format tells which of the various specifications for\nthe same color the program uses.\n\nThis argument is of the form formatId[:param], where formatId specifies the format and\nparam  is  a  positive integer parameter that, depending on formatId, indicates either\nprecision or normalization. The following values are possible for formatId:\n\n\nint    Samples are decimal integers normalized to the maxval specified  by  param.   Example:\nrgb-255:255/128/64 This format is the default, with a maxval of 255.\n\nnorm   Samples  are floating point numbers normalized to unity.  E.g.  rgbi:1.0/0.5/.25 param\nspecifies precision as the number of digits in the fractional part.\n\nx11    Samples are hexadecimal numbers with param digits, e.g. rgb:01/ff/8000\n\n\n"
                },
                {
                    "name": "-radius",
                    "content": "sets the radius of the regions.  A value of zero causes pamgetcolor to measure a  sin‐\ngle pixel and is the default.\n\n"
                },
                {
                    "name": "-infile",
                    "content": "This specifies the Netpbm file to analyze.\n\nIf you don't specify this option, pamgetcolor reads the image from Standard Input.\n\n"
                },
                {
                    "name": "-linear",
                    "content": "This  tells  pamgetcolor  to work with the intensity-linear variation of Netpbm images\nwhere the samples are proportional to light intensity rather than to brightness, as in\ntrue (gamma-adjusted) Netpbm formats.\n\n\n\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "pnmcolormap(1),\n\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "This program was first submitted by Anton Shepelev (anton.txt@gmail.com).\n\n",
            "subsections": []
        },
        "HISTORY": {
            "content": "This program was new in Netpbm 10.83 (June 2018).\n\n",
            "subsections": []
        },
        "Table Of Contents": {
            "content": "•\n\n\u001b]8;;#synopsis\u001b\\SYNOPSIS\u001b]8;;\u001b\\\n\n•\n\n\u001b]8;;#description\u001b\\DESCRIPTION\u001b]8;;\u001b\\\n\n•\n\n\u001b]8;;#examples\u001b\\EXAMPLES\u001b]8;;\u001b\\\n\n•\n\n\u001b]8;;#options\u001b\\OPTIONS\u001b]8;;\u001b\\\n\n•\n\n\u001b]8;;#seealso\u001b\\SEE ALSO\u001b]8;;\u001b\\\n\n•\n\n\u001b]8;;#author\u001b\\AUTHOR\u001b]8;;\u001b\\\n\n•\n\n\u001b]8;;#history\u001b\\HISTORY\u001b]8;;\u001b\\\n",
            "subsections": []
        },
        "DOCUMENT SOURCE": {
            "content": "This manual page was generated by the Netpbm tool 'makeman' from  HTML  source.   The  master\ndocumentation is at\n\nhttp://netpbm.sourceforge.net/doc/pamgetcolor.html\n\nnetpbm documentation                         18 May 2018                  Pamgetcolor User Manual(1)",
            "subsections": []
        }
    },
    "summary": "pamgetcolor - display the average colors from specified regions in an image.",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "This specifies the format in which to output the colors. The output is always a \u001b]8;;libppm.html#colorname\u001b\\Netpbm color specification\u001b]8;;\u001b\\ ; this format tells which of the various specifications for the same color the program uses. This argument is of the form formatId[:param], where formatId specifies the format and param is a positive integer parameter that, depending on formatId, indicates either precision or normalization. The following values are possible for formatId: int Samples are decimal integers normalized to the maxval specified by param. Example: rgb-255:255/128/64 This format is the default, with a maxval of 255. norm Samples are floating point numbers normalized to unity. E.g. rgbi:1.0/0.5/.25 param specifies precision as the number of digits in the fractional part. x11 Samples are hexadecimal numbers with param digits, e.g. rgb:01/ff/8000"
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "sets the radius of the regions. A value of zero causes pamgetcolor to measure a sin‐ gle pixel and is the default."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "This specifies the Netpbm file to analyze. If you don't specify this option, pamgetcolor reads the image from Standard Input."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "This tells pamgetcolor to work with the intensity-linear variation of Netpbm images where the samples are proportional to light intensity rather than to brightness, as in true (gamma-adjusted) Netpbm formats."
        }
    ],
    "examples": [
        "To read the color of the pixel at location (10,14) in the default format:",
        "pamgetcolor 10,14 -infile test.ppm",
        "To read the colors of three pixels in the default format, assigning a label to each pixel:",
        "pamgetcolor 10,10:topleft 100,100:middle 200,200:bottomright -infile test.ppm",
        "To read with 16-bit precision the average color in the circle with a radius  of  four  pixels",
        "and the center at (100,100):",
        "pamgetcolor -format int:65535 -radius 4 100,100 -infile test.ppm"
    ],
    "see_also": [
        {
            "name": "pnmcolormap",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pnmcolormap/1/json"
        }
    ]
}