color

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Color

type Color struct {
	// R 0 - 255
	R float64
	// G 0 - 255
	G float64
	// B 0 - 255
	B float64
	// A 0 - 100
	A float64
}

Color 颜色

func HEX

func HEX(hex string) *Color

HEX 初始化颜色

func HSBA

func HSBA(h, s, hb, a float64) *Color

HSBA 初始化颜色

func RGBA

func RGBA(r, g, b, a float64) *Color

RGBA 初始化颜色

func (*Color) AlphaBlend

func (color *Color) AlphaBlend(color2 *Color) *Color

AlphaBlend 透明度混合

func (*Color) Brightness

func (color *Color) Brightness() float64

Brightness 不考虑透明度获取亮度 0 - 100

func (*Color) Darken

func (color *Color) Darken(amount float64) *Color

Darken 变暗,百分比

func (*Color) HEX

func (color *Color) HEX() string

HEX 十六进制颜色

func (*Color) Hue

func (color *Color) Hue(h float64) *Color

Hue 色相 0 - 360

func (*Color) Lighten

func (color *Color) Lighten(amount float64) *Color

Lighten 增亮,百分比

func (*Color) Opacity

func (color *Color) Opacity(a float64) *Color

Opacity 修改不透明度

Jump to

Keyboard shortcuts

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