mycolor

package
v0.0.0-...-21f7faa Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2014 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MyColor

type MyColor struct {
	R         uint8
	G         uint8
	B         uint8
	A         uint8
	H         float32
	S         float32
	V         float32
	SortValue float32
}

func (*MyColor) ComputeHSV

func (c *MyColor) ComputeHSV()

Read r, g b in the range 0-255; set h, s, v in the range 0-1. Taken from http://stackoverflow.com/questions/8022885/rgb-to-hsv-color-in-javascript

func (*MyColor) SetSortValue

func (c *MyColor) SetSortValue(kind string, ii int)

Compute and set the SortValue for the MyColor object. "kind" is the type of sort to do. Use one of: random semirandom h h2 v s

Jump to

Keyboard shortcuts

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