Struct libnotcurses_sys::ffi::ncpalette [−][src]
Expand description
Palette API. Some terminals only support 256 colors, but allow the full palette to be specified with arbitrary RGB colors. In all cases, it’s more performant to use indexed colors, since it’s much less data to write to the terminal. If you can limit yourself to 256 colors, that’s probably best.
Fields
chans: [u32; 256]
RGB values as regular ol’ channels
Implementations
New NcPalette
.
C style function: ncpalette_new().
Frees this NcPalette
.
C style function: ncpalette_free().
Attempts to configure the terminal with this NcPalette.
C style function: ncpalette_use().
Returns the NcComponent
s from the NcChannel
in this NcPalette
.
C style function: ncpalette_get_rgb().
Extracts the NcComponent
s from an NcChannel
entry inside
this NcPalette, and returns the NcChannel.
C style function: ncpalette_get_rgb().
Sets the NcRgb
value of the NcChannel
entry
inside this NcPalette.
C style function: ncpalette_set().
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ncpalette
impl UnwindSafe for ncpalette
Blanket Implementations
Mutably borrows from an owned value. Read more