colour-accelerate-0.4.0.0: Working with colours in Accelerate

Copyright[2016..2020] Trevor L. McDonell
LicenseBSD3
MaintainerTrevor L. McDonell <trevor.mcdonell@gmail.com>
Stabilityexperimental
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Data.Array.Accelerate.Data.Colour.SRGB

Description

Colours in the sRGB standard.

Synopsis

Documentation

type Colour = SRGB Float Source #

An sRGB colour value

type SRGB a = RGB a Source #

Synonym for an RGB colour that is in the sRGB colour space.

srgb Source #

Arguments

:: Exp Float

red component

-> Exp Float

green component

-> Exp Float

blue component

-> Exp Colour 

Construct an sRGB colour from individual channel components. The components will be clamped to the range [0..1].

srgb8 Source #

Arguments

:: Exp Word8

red component

-> Exp Word8

green component

-> Exp Word8

blue component

-> Exp Colour 

Construct an sRGB colour from 8-bit-per-channel colour components.

toRGB :: Exp (SRGB Float) -> Exp (RGB Float) Source #

Convert a colour in the linear sRGB colour space into the non-linear RGB colour space.

fromRGB :: Exp (RGB Float) -> Exp (SRGB Float) Source #

Convert a colour in the non-linear RGB colour space into the linear sRGB colour space.