color

package module
v0.0.0-...-0ce8462 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: MIT Imports: 5 Imported by: 0

README

color

Manipulate color values. Detect & Parse & Convert & image/color.Color interface

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMalformedHexColor = fmt.Errorf("hex: %w", ErrMalformedColor)
)

Functions

func FromHex

func FromHex(value string) (color.Color, error)

FromHex parses hexadecimal form of color values. See https://en.wikipedia.org/wiki/Web_colors Available forms are: - Three digits: #09C - Six digits: #0099CC - With alpha: #09C2, #0099CC22

Types

type Hex

type Hex color.RGBA

type MalformedColor

type MalformedColor error
var ErrMalformedColor MalformedColor = errors.New("color: malformed value")

Jump to

Keyboard shortcuts

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