STRUCT PIXEL_ARGB_U16(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

struct pixel_argb_u16 β€” the internal representation of a pixel color, bestie. This is the Kernel API Manual page for it, and we are absolutely getting into the pixel lore πŸ’…

✨ SYNOPSIS ✨

The whole struct is literally this:

struct pixel_argb_u16 {
    u16 a, r, g, b;
 };

πŸŽ€ Members πŸŽ€

  • a β€” alpha component value, stored in 16 bits, without padding, using machine endianness. Sixteen bits, zero extra fluff ✨
  • r β€” red component value, stored in 16 bits, without padding, using machine endianness. Red flag? No bestie, red field πŸ“
  • g β€” green component value, stored in 16 bits, without padding, using machine endianness. Green like your terminal when everything passes πŸ’š
  • b β€” blue component value, stored in 16 bits, without padding, using machine endianness. Blue era, no cap πŸ’™

🌈 DESCRIPTION 🌈

So the goal of this structure is to keep enough precision to ensure correct composition results in VKMS and simplify color manipulation by splitting each component into its own field. That's the whole assignment: precision for correct VKMS composition, plus easier color manipulation because every component gets its own little field 🫢

⚠️ Caution: the byte ordering of this structure is machine-dependent. You can't cast it directly to AR48 or xR48. Like, do not do that, bestie β€” that's the warning, periodt πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹


Signed off from ./drivers/gpu/drm/vkms, dated October 2026, on the struct pixel_argb_u16(9) page β€” slay and goodbye πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from