colors

package
v0.0.0-...-df570b3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DistinctMix

func DistinctMix() (int, int, int)

DistinctMix returns a distinct color value based on using rainbow non-overlapping values which can easily be used for distinct items where color is important.

func HSL2RGB

func HSL2RGB(h, s, l float64) (int, int, int)

HSL2RGB converts color values in hsl to rgb.

func HexToRGB

func HexToRGB(hex string) (int, int, int)

HexToRGB turns a hexademicmal color into rgba format. Returns the read, green and blue values as int.

func HexToRGBA

func HexToRGBA(hex string, alpha int) string

HexToRGBA turns a hexademicmal color into rgba format. Alpha values ranges from 0-100

func Hue

func Hue(p, q, t float64) float64

Hue takes the provided values and returns a hue value.

func IsHSL

func IsHSL(c string) bool

IsHSL returns true/false if the giving string is a rgba format data.

func IsHex

func IsHex(c string) bool

IsHex returns true/false if the giving value is a hex color representation.

func IsRGB

func IsRGB(c string) bool

IsRGB returns true/false if the giving string is a rgb format data.

func IsRGBA

func IsRGBA(c string) bool

IsRGBA returns true/false if the giving string is a rgba format data.

func IsRGBFormat

func IsRGBFormat(c string) bool

IsRGBFormat returns true/false if the giving string is a rgb/rgba format data.

func ParseHSL

func ParseHSL(hslData string) (float64, float64, float64)

ParseHSL pulls out the rgb/rgba information from a hsl color format from the provided string.

func ParseRGB

func ParseRGB(rgbData string) (int, int, int, float64)

ParseRGB pulls out the rgb/rgba information from a rgba(9,9,9,9) type formatted string.

func PastelMix

func PastelMix(r, g, b int64) (int64, int64, int64)

PastelMix takes the provided colorbases and returns a random ix of random colors.

func RGBToHSL

func RGBToHSL(r, g, b int) (float64, float64, float64)

RGBToHSL converts the provided rgb value to HSL format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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