csscolors

package
v1.9.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	COLOR_BLACK      = "#000000" // Black
	COLOR_GREY       = "#575757" // Grey
	COLOR_DARK_GRAY  = "#252525" // Dark Grey
	COLOR_LIGHT_GRAY = "#9d9d9d" // Light Grey
	COLOR_RED        = "#ff0000" // Red
	COLOR_GREEN      = "#00ff00" // Green
	COLOR_BLUE       = "#0000ff" // Blue
	COLOR_YELLOW     = "#ffff00" // Yellow
	COLOR_PURPLE     = "#ff00ff" // Purple
	COLOR_CYAN       = "#00ffff" // Cyan
	COLOR_ORANGE     = "#ffa500" // Orange
	COLOR_BROWN      = "#a52a2a" // Brown
	COLOR_PINK       = "#ffc0cb" // Pink
	COLOR_WHITE      = "#ffffff" // White
	COLOR_LIME       = "#00ff00" // Lime
	COLOR_MAROON     = "#800000" // Maroon
	COLOR_NAVY       = "#000080" // Navy
	COLOR_OLIVE      = "#808000" // Olive
	COLOR_TEAL       = "#008080" // Teal
	COLOR_AQUA       = "#00ffff" // Aqua
	COLOR_FUCHSIA    = "#ff00ff" // Fuchsia
	COLOR_SILVER     = "#c0c0c0" // Silver
)

Predefined colors

Variables

View Source
var (
	COLOR_MAIN        = "white"           // Main color - white
	COLOR_ONE         = "#222e50"         // COLOR_ONE - dark blue
	COLOR_ONE_LIGHTER = "#334679"         // COLOR_ONE_LIGHTER - lighter dark blue
	COLOR_TWO         = "#e9d985"         // COLOR_TWO - yellow
	COLOR_THREE       = "#439a86"         // COLOR_THREE - green
	COLOR_FOUR        = "#DADFF7"         // COLOR_FOUR - light blue
	COLOR_FIVE        = "#007991"         // COLOR_FIVE - dark green
	COLOR_SIX         = "#ff0057"         // COLOR_SIX - red
	BACKGROUND_COLOR  = "rgba(0,0,0,0.5)" // Background color (for modals, etc.)
)

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