RGBA

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColGdkRGBA2Hex

func ColGdkRGBA2Hex(value *gdk.RGBA) string

TODO Checkout for ALPHA chanel Convert gdk.RGBA to Hex string value: "#EF2929".

func RGBAParseFromCss

func RGBAParseFromCss(r, g, b int, a float64) *gdk.RGBA

RGBAParseFromCss: Convert CSS RGBA synbtax to GdkRGBA structure.

func RGBAParseToCss

func RGBAParseToCss(rgba *gdk.RGBA, invert ...bool) string

RGBAParseToCss: Convert GdkRGBA to string that match required format by CSS syntax. '255, 255, 255, 0.5'. 'invert' indicate that result will be inversed.

Types

type Rgba

type Rgba struct {
	Red,
	Green,
	Blue int
	Alpha float64
}

Rgba: Contains RGBA values to facilitate transfer between local storage intended to be backed up such as in an 'option' file and the GdkRGBA object.

func RgbaNew

func RgbaNew(r, g, b int, a float64) *Rgba

func (*Rgba) FromGdkRGBA

func (rgba *Rgba) FromGdkRGBA(RGBA *gdk.RGBA)

FromGdkRGBA: Set values from GdkRGBA object

func (*Rgba) ToGdkRGBA

func (rgba *Rgba) ToGdkRGBA(options ...bool) *gdk.RGBA

ToGdkRGBA: Set values to a new GdkRGBA object 'options' means 1st = invert, 2nd = preserve alpha

Jump to

Keyboard shortcuts

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