palette

package
v0.0.0-...-abd1f79 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2017 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package palette provides palettes and ways to define palettes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Continuous

type Continuous interface {
	Map(x float64) color.Color
}

A Continuous palette is a function from [0, 1] to colors. It may be sequential, diverging, or circular.

var Viridis Continuous

Viridis is a continuous sequential color map that is perceptually uniform, colorblind-friendly, and converts well to grayscale. It goes from black to blue to green to yellow.

Viridis was developed by Stéfan van der Walt, Nathaniel Smith, and Eric Firing as the default colormap for Matplotlib 2.0. It is available under a CC0 (no rights reserved) license.

type RGBGradient

type RGBGradient struct {
	// Colors is the sequence of colors to interpolate between.
	// Interpolation assumes the colors are sRGB values.
	Colors []color.RGBA

	// Stops is an optional sequence of stop positions. It may be
	// nil, in which case Colors are evenly spaced on the interval
	// [0, 1]. Otherwise, it must be a slice with the same length
	// as Colors and must be in ascending order.
	Stops []float64
}

RGBGradient is a Continuous palette that interpolates between a sequence of colors.

func (RGBGradient) Map

func (g RGBGradient) Map(x float64) color.Color

Directories

Path Synopsis
Package brewer provides color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/).
Package brewer provides color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/).

Jump to

Keyboard shortcuts

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