xxxfb_setcolreg(9)
β¨ NAME β¨
okay so bestie, this is xxxfb_setcolreg(9) from the Kernel API Manual, and the name is literally the whole vibe: xxxfb_setcolreg β an optional function that sets a color register. slay. π
π SYNOPSIS π
int xxxfb_setcolreg (unsigned regno , unsigned red , unsigned green ,
unsigned blue , unsigned transp , struct fb_info *info );
π ARGUMENTS π
regnoβ which register in the CLUT we are programming. iykyk.redβ the red value, which can be up to 16 bits wide. the reddest flag energy.greenβ the green value, which can be up to 16 bits wide. iconic.blueβ the blue value, which can be up to 16 bits wide.transpβ if supported, the alpha value, which can be up to 16 bits wide. fancy.infoβ frame buffer info structure. main character struct fr fr.
π¦ DESCRIPTION π¦
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 pseudo 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. no cap, that part is lowkey important.
Returns negative errno on error, or zero on success. periodt. β¨
π SEE ALSO π
Kernel file ./drivers/video/fbdev/skeletonfb.c β and the whole squad is xxxfb_open(9), xxxfb_release(9), xxxfb_check_var(9), xxxfb_set_par(9), xxxfb_pan_display(9), xxxfb_blank(9), xxxfb_fillrect(9), xxxfb_copyarea(9), xxxfb_imageblit(9), xxxfb_cursor(9), xxxfb_sync(9), xxxfb_suspend(9), xxxfb_resume(9), xxxfb_suspend(9), xxxfb_resume(9). yes bestie, those last two are listed twice β we keep the facts exactly as they are, always. π«Ά
cute little sign-off π: this pageβs source/version footer points at ./drivers/video/fbdev, dated October 2026. thatβs the vibe check, and it passed. πΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms