colours

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package colours provides colour constants and a couple of utility functions.

Index

Constants

View Source
const (
	Teal        = 0x1abc9c
	DarkTeal    = 0x11806a
	Green       = 0x2ecc71
	DarkGreen   = 0x1f8b4c
	Blue        = 0x3498db
	DarkBlue    = 0x206694
	Purple      = 0x9b59b6
	DarkPurple  = 0x71368a
	Magenta     = 0xe91e63
	DarkMagenta = 0xad1457
	Gold        = 0xf1c40f
	DarkGold    = 0xc27c0e
	Orange      = 0xe67e22
	DarkOrange  = 0xa84300
	Red         = 0xe74c3c
	DarkRed     = 0x992d22
	LighterGrey = 0x95a5a6
	DarkGrey    = 0x607d8b
	LightGrey   = 0x979c9f
	DarkerGrey  = 0x546e7a
	Blurple     = 0x7289da
	Greyple     = 0x99aab5
	DarkTheme   = 0x36393F
)

Common hex colours, taken from discord.py

Variables

This section is empty.

Functions

func Average

func Average(img image.Image) (red uint8, green uint8, blue uint8, alpha uint8)

Average gets the average colour from an image. Return values are R, G, B, A respectively.

func FromRGB

func FromRGB(r, g, b uint8) uint32

FromRGB returns an integer colour from separate R, G, and B bytes

Types

This section is empty.

Jump to

Keyboard shortcuts

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