View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Ross McFarland > Gtk2-1.043 > xs/GdkColor.xs


Annotate this POD


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


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.


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: