fcolor

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2016 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package fcolor provides a basic RGBA color type which stores it's values as float64 types in the range from 0.0 to 1.0.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RGBAF64

type RGBAF64 struct {
	R, G, B, A float64
}

RGBAF64 represents an RGBA color using the range 0.0 to 1.0 with a float64 for each channel.

func NewRGBAF64

func NewRGBAF64(r, g, b, a uint8) RGBAF64

NewRGBAF64 returns a new RGBAF64 color based on the provided uint8 values. uint8 value 0 maps to 0, 128 to 0.5 and 255 to 1.0.

func (*RGBAF64) Clamp

func (c *RGBAF64) Clamp()

Clamp limits the channel values of the RGBAF64 color to the range 0.0 to 1.0.

Jump to

Keyboard shortcuts

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