xxxfb_setcolreg(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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