.TH GETCMAP 9.2 .SH NAME getcmap \- read a color map from a file .SH SYNOPSIS .B #include .PP .B #include .PP .B int getcmap(char *name, uchar *map) .SH DESCRIPTION .I Getcmap retrieves the named colormap and stores it in .I map. Usually .I name is the name of a colormap file (see .IR cmap (9.6)) or a picfile with a .B CMAP= attribute. If the file is not found, it is sought in .BR /lib/fb/cmap . .PP If the .I file cannot be found, and its name has the form .BI gamma number, a colormap is fabricated with all three channels of its .IR n th entry set to .RI 255×( n /255)\u\s-21/ number\s+2\d . If the name is just .BR gamma , .IR number =2.3 is assumed. .PP There is no .IR putcmap , because .B write (in .IR read (2)) can do the job. .SH "SEE ALSO .IR cmap (9.6), .IR picfile (9.6) .IR rgbpix (2)