color

package
v0.0.0-...-5ed2699 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	White = Color{1.0, 1.0, 1.0}
	Black = Color{0.0, 0.0, 0.0}
)

Functions

This section is empty.

Types

type Color

type Color struct {
	R, G, B float64
}

Color defines the basic Red/Green/Blue as raw float64 values

func (Color) Add

func (c Color) Add(c2 Color) Color

Add adds the 2 colors (return a new color)

func (Color) Mult

func (c Color) Mult(c2 Color) Color

Mult Multiplies 2 colors together (component by component multiplication)

func (Color) PixelValue

func (c Color) PixelValue() uint32

PixelValue converts a raw Color into a pixel value (0-255) packed into a uint32

func (Color) Scale

func (c Color) Scale(t float64) Color

Scale scales the Color by the value (return a new Color)

Jump to

Keyboard shortcuts

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