caramia-0.2.0.1: Less painful OpenGL 3.3 rendering

Safe HaskellSafe-Inferred
LanguageHaskell2010

Graphics.Caramia.Color

Contents

Description

Color handling.

Synopsis

Types

data Color Source

The color data type.

This data type says nothing about the color space these values are in. The color space depends on the usage; for example, a framebuffer with sRGB textures attached uses sRGB color space in these color values.

Constructing colors

rgba :: Float -> Float -> Float -> Float -> Color Source

Construct a color from rgba values.

Lenses

rgbaL :: Lens' Color (Float, Float, Float, Float) Source

Lens to all components.

redL :: Lens' Color Float Source

Lens to red component.

greenL :: Lens' Color Float Source

Lens to green component.

blueL :: Lens' Color Float Source

Lens to blue component.

alphaL :: Lens' Color Float Source

Lens to alpha component.

Views

viewRgba :: Color -> (Float, Float, Float, Float) Source

View rgba in a tuple.