{
    "content": [
        {
            "type": "text",
            "text": "# GD::Graph::colour (perldoc)\n\n## NAME\n\nGD::Graph::colour - Colour manipulation routines for use with GD::Graph\n\n## SYNOPSIS\n\nuse GD::Graph::colour qw(:colours :lists :files :convert);\n\n## DESCRIPTION\n\nThe GD::Graph::colour package provides a few routines to work with colours. The functionality of\nthis package is mainly defined by what is needed, now and historically, by the GD::Graph\nmodules.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **FUNCTIONS**\n- **PREDEFINED COLOUR NAMES**\n- **AUTHOR** (1 subsections)\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "GD::Graph::colour",
        "section": "",
        "mode": "perldoc",
        "summary": "GD::Graph::colour - Colour manipulation routines for use with GD::Graph",
        "synopsis": "use GD::Graph::colour qw(:colours :lists :files :convert);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "FUNCTIONS",
                "lines": 43,
                "subsections": []
            },
            {
                "name": "PREDEFINED COLOUR NAMES",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": [
                    {
                        "name": "Copyright",
                        "lines": 6
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "GD::Graph::colour - Colour manipulation routines for use with GD::Graph\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use GD::Graph::colour qw(:colours :lists :files :convert);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The GD::Graph::colour package provides a few routines to work with colours. The functionality of\nthis package is mainly defined by what is needed, now and historically, by the GD::Graph\nmodules.\n",
                "subsections": []
            },
            "FUNCTIONS": {
                "content": "colourlist( *number of colours* )\nReturns a list of *number of colours* colour names known to the package. Exported with the\n:lists tag.\n\nsortedcolourlist( *number of colours* )\nReturns a list of *number of colours* colour names known to the package, sorted by luminance or\nhue. NB. Right now it always sorts by luminance. Will add an option in a later stage to decide\nsorting method at run time. Exported with the :lists tag.\n\nrgb( *colour name* )\nReturns a list of the RGB values of *colour name*. if the colour name is a string of the form\nthat is acceptable to the hex2rgb sub, then the colour will be added to the list dynamically.\nExported with the :colours tag.\n\nhue( *R,G,B* )\nReturns the hue of the colour with the specified RGB values. Exported with the :colours tag.\n\nluminance( *R,G,B* )\nReturns the luminance of the colour with the specified RGB values. Exported with the :colours\ntag.\n\naddcolour(colourname => [$r, $g, $b]) or\naddcolour('#7fe310')\nSelf-explanatory. Exported with the :colours tag.\n\nrgb2hex($red, $green, $blue)\nhex2rgb('#7fe310')\nThese functions translate a list of RGB values into a hexadecimal string, as is commonly used in\nHTML and the Image::Magick API, and vice versa. Exported with the :convert tag.\n\nreadrgb( file name )\nReads in colours from a rgb file as used by the X11 system.\n\nDoing something like:\n\nuse GD::Graph::bars;\nuse GD::Graph::colour;\n\nGD::Graph::colour::readrgb(\"rgb.txt\") or die \"cannot read colours\";\n\nWill allow you to use any colours defined in rgb.txt in your graph. Exported with the :files\ntag.\n",
                "subsections": []
            },
            "PREDEFINED COLOUR NAMES": {
                "content": "white, lgray, gray, dgray, black, lblue, blue, dblue, gold, lyellow, yellow, dyellow, lgreen,\ngreen, dgreen, lred, red, dred, lpurple, purple, dpurple, lorange, orange, pink, dpink, marine,\ncyan, lbrown, dbrown.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Martien Verbruggen <mgjv@tradingpost.com.au>\n",
                "subsections": [
                    {
                        "name": "Copyright",
                        "content": "GIFgraph: Copyright (c) 1995-1999 Martien Verbruggen. Chart::PNGgraph: Copyright (c) 1999 Steve\nBonds. GD::Graph: Copyright (c) 1999 Martien Verbruggen.\n\nAll rights reserved. This package is free software; you can redistribute it and/or modify it\nunder the same terms as Perl itself.\n"
                    }
                ]
            },
            "SEE ALSO": {
                "content": "GD::Graph, GD::Graph::FAQ\n",
                "subsections": []
            }
        }
    }
}