ghostty_color_rgb_get function

  1. @Native<Void Function(GhosttyColorRgb, Pointer<Uint8>, Pointer<Uint8>, Pointer<Uint8>)>(GhosttyColorRgb, ffi.Pointer<ffi.Uint8>, ffi.Pointer<ffi.Uint8>, ffi.Pointer<ffi.Uint8>)>()
void ghostty_color_rgb_get(
  1. GhosttyColorRgb color,
  2. Pointer<Uint8> r,
  3. Pointer<Uint8> g,
  4. Pointer<Uint8> b,
)

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,
);