colors

package
v0.0.0-...-1143ee3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package colors provides helper functions to manage color and color schemes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Colorful

func Colorful(c colorful.Color) bar.Color

Colorful constructs an i3 color from a colorful color.

func Empty

func Empty() bar.Color

Empty returns an "empty" color, which will not be sent to i3.

func Hex

func Hex(hex string) bar.Color

Hex sanity-checks and constructs a color from a hex-string. Any string that can be parsed by colorful is acceptable.

func LoadFromArgs

func LoadFromArgs(args []string)

LoadFromArgs loads a color scheme from command-line arguments of the form name=value.

func LoadFromConfig

func LoadFromConfig(filename string) error

LoadFromConfig loads a color scheme from a i3status config file by reading all keys that start with 'color_'

func LoadFromMap

func LoadFromMap(s map[string]string)

LoadFromMap sets the colour scheme from code.

func Scheme

func Scheme(name string) bar.Color

Scheme gets a color from the user-defined color scheme. Some common names are 'good', 'bad', and 'degraded'.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL