csscolors

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	COLOR_BLACK      = "#000000"
	COLOR_GREY       = "#575757"
	COLOR_DARK_GRAY  = "#252525"
	COLOR_LIGHT_GRAY = "#9d9d9d"
	COLOR_RED        = "#ff0000"
	COLOR_GREEN      = "#00ff00"
	COLOR_BLUE       = "#0000ff"
	COLOR_YELLOW     = "#ffff00"
	COLOR_PURPLE     = "#ff00ff"
	COLOR_CYAN       = "#00ffff"
	COLOR_ORANGE     = "#ffa500"
	COLOR_BROWN      = "#a52a2a"
	COLOR_PINK       = "#ffc0cb"
	COLOR_WHITE      = "#ffffff"
	COLOR_LIME       = "#00ff00"
	COLOR_MAROON     = "#800000"
	COLOR_NAVY       = "#000080"
	COLOR_OLIVE      = "#808000"
	COLOR_TEAL       = "#008080"
	COLOR_AQUA       = "#00ffff"
	COLOR_FUCHSIA    = "#ff00ff"
	COLOR_SILVER     = "#c0c0c0"
)

Predefined colors

Variables

View Source
var (
	COLOR_MAIN       = "white"
	COLOR_ONE        = "#222e50"
	COLOR_TWO        = "#e9d985"
	COLOR_THREE      = "#439a86"
	COLOR_FOUR       = "#DADFF7"
	COLOR_FIVE       = "#007991"
	COLOR_SIX        = "#ff0057"
	BACKGROUND_COLOR = "rgba(0,0,0,0.5)"
)

General colors for use in CSS. Can be overridden.

Functions

func Complementary added in v1.0.4

func Complementary(col string) (string, error)

Types

type Color added in v1.0.4

type Color struct {
	R float64
	G float64
	B float64
}

https://github.com/lucasb-eyer/go-colorful

func Hex added in v1.0.4

func Hex(scol string) (Color, error)

https://github.com/lucasb-eyer/go-colorful Hex parses a "html" hex color-string, either in the 3 "#f0c" or 6 "#ff1034" digits form.

func Hsv added in v1.0.4

func Hsv(H, S, V float64) Color

https://github.com/lucasb-eyer/go-colorful Hsv creates a new Color given a Hue in [0..360], a Saturation and a Value in [0..1]

func HueOffset added in v1.0.7

func HueOffset(col Color, degrees int) Color

https://github.com/muesli/gamut

func RGB255 added in v1.0.4

func RGB255(r, g, b uint8) Color

func UnsafeHex added in v1.1.6

func UnsafeHex(scol string) Color

!WARNING! Only use this if you are sure the color is valid.

func (*Color) Complementary added in v1.0.4

func (col *Color) Complementary() Color

func (Color) Hex added in v1.0.4

func (col Color) Hex() string

https://github.com/lucasb-eyer/go-colorful Hex returns the hex "html" representation of the color, as in #ff0080.

func (Color) Hsv added in v1.0.4

func (col Color) Hsv() (h, s, v float64)

https://github.com/lucasb-eyer/go-colorful

func (Color) RGB255 added in v1.0.4

func (col Color) RGB255() (r, g, b uint8)

https://github.com/lucasb-eyer/go-colorful Might come in handy sometimes to reduce boilerplate code.

func (Color) RGBA added in v1.0.4

func (col Color) RGBA() (r, g, b, a uint32)

https://github.com/lucasb-eyer/go-colorful Implement the Go color.Color interface.

func (*Color) Triadic added in v1.0.7

func (c *Color) Triadic() []Color

Triadic returns the triadic values for any given color

Jump to

Keyboard shortcuts

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