.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "XXXFB_SETCOLREG" "" "06 October 2005" "" "" .SH NAME xxxfb_setcolreg \- Optional function. Sets a color register. .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp int xxxfb_setcolreg (unsigned \fIregno\fB, unsigned \fIred\fB, unsigned \fIgreen\fB, unsigned \fIblue\fB, unsigned \fItransp\fB, const struct fb_info * \fIinfo\fB); \fR .SH "ARGUMENTS" .TP \fB\fIregno\fB\fR Which register in the CLUT we are programming .TP \fB\fIred\fB\fR The red value which can be up to 16 bits wide .TP \fB\fIgreen\fB\fR The green value which can be up to 16 bits wide .TP \fB\fIblue\fB\fR The blue value which can be up to 16 bits wide. .TP \fB\fItransp\fB\fR If supported the alpha value which can be up to 16 bits wide. .TP \fB\fIinfo\fB\fR frame buffer info structure .SH "DESCRIPTION" .PP Set a single color register. The values supplied have a 16 bit magnitude which needs to be scaled in this function for the hardware. Things to take into consideration are how many color registers, if any, are supported with the current color visual. With truecolor mode no color palettes are supported. Here a psuedo palette is created which we store the value in pseudo_palette in struct fb_info. For pseudocolor mode we have a limited color palette. To deal with this we can program what color is displayed for a particular pixel value. DirectColor is similar in that we can program each color field. If we have a static colormap we don't need to implement this function. .PP Returns negative errno on error, or zero on success.