color

package
Version: v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package color implements color functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alpha

func Alpha(c Color) float64

func Hue

func Hue(c Color) float64

func HueP

func HueP(c Color) float64

func Lightness

func Lightness(c Color) float64

func LightnessP

func LightnessP(c Color) float64

func Saturation

func Saturation(c Color) float64

func SaturationP

func SaturationP(c Color) float64

Types

type Color

type Color struct {
	H, S, L, A float64
	Perceptual bool
}

func Darken

func Darken(c Color, v float64) Color

func DarkenP

func DarkenP(c Color, v float64) Color

func Desaturate

func Desaturate(c Color, v float64) Color

func DesaturateP

func DesaturateP(c Color, v float64) Color

func FadeIn

func FadeIn(c Color, v float64) Color

func FadeOut

func FadeOut(c Color, v float64) Color

func FromHsla

func FromHsla(h, s, l, a float64) Color

func FromHusl

func FromHusl(h, s, l, a float64) Color

func FromRgba

func FromRgba(r, g, b, a float64, perceptual bool) Color

func Greyscale

func Greyscale(c Color) Color

func GreyscaleP

func GreyscaleP(c Color) Color

func Lighten

func Lighten(c Color, v float64) Color

func LightenP

func LightenP(c Color, v float64) Color

func Mix

func Mix(c1, c2 Color, weight float64) Color

func Multiply

func Multiply(c Color, v float64) Color

func MustParse

func MustParse(hex string) Color

func Parse

func Parse(colorStr string) (Color, error)

func Saturate

func Saturate(c Color, v float64) Color

func SaturateP

func SaturateP(c Color, v float64) Color

func SetHue

func SetHue(c, hue Color) Color

func Spin

func Spin(c Color, v float64) Color

func SpinP

func SpinP(c Color, v float64) Color

func (Color) HexString

func (color Color) HexString() string

func (Color) String

func (color Color) String() string

func (Color) ToPerceptual

func (color Color) ToPerceptual() Color

func (Color) ToRgb

func (color Color) ToRgb() (float64, float64, float64)

func (Color) ToStandard

func (color Color) ToStandard() Color

Jump to

Keyboard shortcuts

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