Ross McFarland > Gtk2-1.043 > xs/GdkColor.xs

Download:
Gtk2-Perl/Gtk2-1.043.tar.gz

Annotate this POD

CPAN RT

New  2
Open  6
View/Report Bugs
Source   Latest Release: Gtk2-1.203

DESCRIPTION ^

Colormaps are used to store the mappings between the RGB values you ask for and the actual, hardware-dependent values used to display those colors. The $colormap->alloc_color and $colormap->alloc_colors methods do the necessary work to allocate a color within the visual; this actually has nothing to do with memory management, so it is important that you call $colormap->free_colors to release those spots in the colormap allocated by alloc_color and alloc_colors.

DESCRIPTION ^

Gdk's colors are 16-bit RGB values -- that is, the red, green, and blue components are integer values from 0 to 65535, with 65535 meaning full saturation. If you are used to dealing with colors on the range of 0 to 255, just scale those numbers by a factor of 257 (yes, 257).

syntax highlighting: