rgb

package
v0.0.0-...-ed9fe1d Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2018 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RGB

type RGB int

RGB is a alias for 32bit color interger

func MustParseRGB

func MustParseRGB(s string) RGB

MustParseRGB is like ParseRGB but panic if an error occurrs

func ParseRGB

func ParseRGB(s string) (RGB, error)

ParseRGB to parse the string and return as RGB

func (RGB) MarshalJSON

func (rgb RGB) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler#MarshalJSON()

func (RGB) ToHexString

func (rgb RGB) ToHexString() string

ToHexString to get the hex string expression for the color

func (*RGB) UnmarshalJSON

func (rgb *RGB) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler#UnmarshalJSON()

Jump to

Keyboard shortcuts

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