fcolor

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2020 License: MIT Imports: 1 Imported by: 8

Documentation

Overview

Package fcolor provides a basic RGBAF64 color type.

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