panel

package
v0.0.0-...-d0bc179 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Avg

func Avg(min, max float64) float64

Return the average between two float values.

func Scale

func Scale(x float64) float64

The scale is not linear. The closest estimate so far is the average between the square and cubic roots of x.

func ToFloat

func ToFloat(i int) float64

Convert a 10-bit integer to a floating point number between 0.0-1.0.

Types

type Panel

type Panel struct {
	L      float64
	A      float64
	B      float64
	Adjust float64
}

Panel represents the state of the Labpanel hardware board. The values of L, A and B correspond to L*a*b colors.

func New

func New(L, a, b, adjust float64) Panel

Convert from ranges 0.0-1.0 into native L*a*b ranges. https://stackoverflow.com/questions/19099063/what-are-the-ranges-of-coordinates-in-the-cielab-color-space

func Parse

func Parse(str string) Panel

Parse a string containing four 10-bit numbers into a Panel structure.

func (Panel) Color

func (p Panel) Color() colorful.Color

Jump to

Keyboard shortcuts

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