Struct cursive::theme::Palette[][src]

pub struct Palette { /* fields omitted */ }

Color configuration for the application.

Assign each color role an actual color.

It implements Index and IndexMut to access and modify this mapping:

Example

use cursive::theme::PaletteColor::*;
use cursive::theme::Color::*;
use cursive::theme::BaseColor::*;

let mut palette = Palette::default();

assert_eq!(palette[Background], Dark(Blue));
palette[Shadow] = Light(Red);

Methods

impl Palette
[src]

Returns a custom color from this palette.

Returns None if the given key was not found.

Returns a new palette where the given namespace has been merged.

All values in the namespace will override previous values.

Sets the color for the given key.

This will update either the basic palette or the custom values.

Adds a color namespace to this palette.

Trait Implementations

impl PartialEq for Palette
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Palette
[src]

impl Clone for Palette
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Palette
[src]

Formats the value using the given formatter. Read more

impl Index<PaletteColor> for Palette
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl IndexMut<PaletteColor> for Palette
[src]

Performs the mutable indexing (container[index]) operation.

impl Default for Palette
[src]

Returns the default palette for a cursive application.

  • Background => Dark(Blue)
  • Shadow => Dark(Black)
  • View => Dark(White)
  • Primary => Dark(Black)
  • Secondary => Dark(Blue)
  • Tertiary => Dark(White)
  • TitlePrimary => Dark(Red)
  • TitleSecondary => Dark(Yellow)
  • Highlight => Dark(Red)
  • HighlightInactive => Dark(Blue)

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for Palette

impl Sync for Palette