palettes

package
v0.0.0-...-a31fb98 Latest Latest
Warning

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

Go to latest
Published: May 22, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Black = color.RGBA{0, 0, 0, 255}
View Source
var Blue = color.RGBA{0, 0, 255, 255}
View Source
var Champagne = color.RGBA{247, 231, 206, 255}
View Source
var ColorNames = map[string]color.Color{
	"blue":          Blue,
	"red":           Red,
	"green":         Green,
	"yellow":        Yellow,
	"magenta":       Magenta,
	"cyan":          Cyan,
	"black":         Black,
	"white":         White,
	"darkgreen":     DarkGreen,
	"champagne":     Champagne,
	"darkchampagne": DarkChampagne,
	"orange":        Orange,
	"violet":        Violet,
	"lightpink":     LightPink,
	"lightgreen":    LightGreen,
	"purple":        Purple,
	"indigo":        Indigo,
	"teal":          Teal,
	"darkblue":      DarkBlue,
	"softpink":      SoftPink,
}
View Source
var Cyan = color.RGBA{0, 255, 255, 255}
View Source
var DarkBlue = color.RGBA{0, 0, 128, 255}
View Source
var DarkChampagne = color.RGBA{41, 25, 0, 255}
View Source
var DarkGreen = color.RGBA{0, 100, 0, 255}
View Source
var Green = color.RGBA{0, 255, 0, 255}
View Source
var Indigo = color.RGBA{75, 0, 130, 255}
View Source
var LightGreen = color.RGBA{172, 225, 175, 255}
View Source
var LightPink = color.RGBA{255, 182, 193, 255}
View Source
var Magenta = color.RGBA{255, 0, 255, 255}
View Source
var Orange = color.RGBA{255, 127, 0, 255}
View Source
var Purple = color.RGBA{148, 0, 211, 255}
View Source
var Red = color.RGBA{255, 0, 0, 255}
View Source
var SoftPink = color.RGBA{255, 221, 244, 255}
View Source
var Teal = color.RGBA{0, 128, 128, 255}
View Source
var Violet = color.RGBA{139, 0, 255, 255}
View Source
var White = color.RGBA{255, 255, 255, 255}
View Source
var Yellow = color.RGBA{255, 255, 0, 255}

Functions

func ColorFromContinuousPalette

func ColorFromContinuousPalette(rawValue float64, converge bool, palette Colors) color.Color

ColorFromContinuousPalette returns the color corresponding to the value from 0 to 1 (0 is the first color of the palette, 1 is the last color of the palette)

Types

type ColoringFunction

type ColoringFunction func(img *image.RGBA64, x int, y int, value float64, converge bool)

func ContinuousColoring

func ContinuousColoring(palette Colors) ColoringFunction

type Colors

type Colors struct {
	Divergence color.Color
	ListColors []color.Color
	MaxValue   int
}

Colors used for the palette

Jump to

Keyboard shortcuts

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