ghostty_color_rgb_get function
Get the RGB color components.
This function extracts the individual red, green, and blue components from a GhosttyColorRgb value. Primarily useful in WebAssembly environments where accessing struct fields directly is difficult.
@param color The RGB color value @param r Pointer to store the red component (0-255) @param g Pointer to store the green component (0-255) @param b Pointer to store the blue component (0-255)
@ingroup sgr
Implementation
@ffi.Native<
ffi.Void Function(
GhosttyColorRgb,
ffi.Pointer<ffi.Uint8>,
ffi.Pointer<ffi.Uint8>,
ffi.Pointer<ffi.Uint8>,
)
>()
external void ghostty_color_rgb_get(
GhosttyColorRgb color,
ffi.Pointer<ffi.Uint8> r,
ffi.Pointer<ffi.Uint8> g,
ffi.Pointer<ffi.Uint8> b,
);