Struct libnotcurses_sys::ffi::ncpalette[][src]

#[repr(C)]
pub struct ncpalette { pub chans: [u32; 256], }
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 NcComponents from the NcChannel in this NcPalette.

C style function: ncpalette_get_rgb().

Extracts the NcComponents 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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.