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.RGBA

Description

RGBA quadruples for an unspecified colour space

Synopsis

Documentation

type Colour = RGBA Float Source #

An RGBA colour value, in an unspecified colour space.

data RGBA a Source #

An RGBA colour value to hold the colour components. All components lie in the range [0..1] for floating point values, or [0..255] for byte values.

Colours in the floating-point representation are stored in the usual unzipped struct-of-array representation. Colours with Word8 components are stored in a packed array-of-struct representation, which is typically more convenient when exporting the data (e.g. as a 32-bit BMP image)

Constructors

RGBA a a a a 
Instances
Functor RGBA Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

Methods

fmap :: (a -> b) -> RGBA a -> RGBA b #

(<$) :: a -> RGBA b -> RGBA a #

Lift Exp (RGBA Float) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

Associated Types

type Plain (RGBA Float) :: Type #

Methods

lift :: RGBA Float -> Exp (Plain (RGBA Float)) #

Lift Exp (RGBA Word8) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

Associated Types

type Plain (RGBA Word8) :: Type #

Methods

lift :: RGBA Word8 -> Exp (Plain (RGBA Word8)) #

Lift Exp (RGBA (Exp Float)) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

Associated Types

type Plain (RGBA (Exp Float)) :: Type #

Methods

lift :: RGBA (Exp Float) -> Exp (Plain (RGBA (Exp Float))) #

Lift Exp (RGBA (Exp Word8)) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

Associated Types

type Plain (RGBA (Exp Word8)) :: Type #

Methods

lift :: RGBA (Exp Word8) -> Exp (Plain (RGBA (Exp Word8))) #

Unlift Exp (RGBA (Exp Float)) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

Methods

unlift :: Exp (Plain (RGBA (Exp Float))) -> RGBA (Exp Float) #

Unlift Exp (RGBA (Exp Word8)) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

Methods

unlift :: Exp (Plain (RGBA (Exp Word8))) -> RGBA (Exp Word8) #

Eq a => Eq (RGBA a) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

Methods

(==) :: RGBA a -> RGBA a -> Bool #

(/=) :: RGBA a -> RGBA a -> Bool #

(Fractional a, Unlift Exp (RGBA (Exp a)), Plain (RGBA (Exp a)) ~ RGBA a) => Fractional (Exp (RGBA a)) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

Methods

(/) :: Exp (RGBA a) -> Exp (RGBA a) -> Exp (RGBA a) #

recip :: Exp (RGBA a) -> Exp (RGBA a) #

fromRational :: Rational -> Exp (RGBA a) #

(Num a, Fractional a) => Fractional (RGBA a) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

Methods

(/) :: RGBA a -> RGBA a -> RGBA a #

recip :: RGBA a -> RGBA a #

fromRational :: Rational -> RGBA a #

(Num a, Unlift Exp (RGBA (Exp a)), Plain (RGBA (Exp a)) ~ RGBA a) => Num (Exp (RGBA a)) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

Methods

(+) :: Exp (RGBA a) -> Exp (RGBA a) -> Exp (RGBA a) #

(-) :: Exp (RGBA a) -> Exp (RGBA a) -> Exp (RGBA a) #

(*) :: Exp (RGBA a) -> Exp (RGBA a) -> Exp (RGBA a) #

negate :: Exp (RGBA a) -> Exp (RGBA a) #

abs :: Exp (RGBA a) -> Exp (RGBA a) #

signum :: Exp (RGBA a) -> Exp (RGBA a) #

fromInteger :: Integer -> Exp (RGBA a) #

Num a => Num (RGBA a) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

Methods

(+) :: RGBA a -> RGBA a -> RGBA a #

(-) :: RGBA a -> RGBA a -> RGBA a #

(*) :: RGBA a -> RGBA a -> RGBA a #

negate :: RGBA a -> RGBA a #

abs :: RGBA a -> RGBA a #

signum :: RGBA a -> RGBA a #

fromInteger :: Integer -> RGBA a #

Show a => Show (RGBA a) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

Methods

showsPrec :: Int -> RGBA a -> ShowS #

show :: RGBA a -> String #

showList :: [RGBA a] -> ShowS #

Generic (RGBA a) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

Associated Types

type Rep (RGBA a) :: Type -> Type #

Methods

from :: RGBA a -> Rep (RGBA a) x #

to :: Rep (RGBA a) x -> RGBA a #

Elt (RGBA Float) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

Associated Types

type EltR (RGBA Float) :: Type

Methods

eltR :: TypeR (EltR (RGBA Float))

tagsR :: [TagR (EltR (RGBA Float))]

fromElt :: RGBA Float -> EltR (RGBA Float)

toElt :: EltR (RGBA Float) -> RGBA Float

Elt (RGBA Word8) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

Associated Types

type EltR (RGBA Word8) :: Type

Methods

eltR :: TypeR (EltR (RGBA Word8))

tagsR :: [TagR (EltR (RGBA Word8))]

fromElt :: RGBA Word8 -> EltR (RGBA Word8)

toElt :: EltR (RGBA Word8) -> RGBA Word8

NamedColour (RGBA Float) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

Methods

antiqueWhite :: RGBA Float Source #

azure :: RGBA Float Source #

bisque :: RGBA Float Source #

blanchedAlmond :: RGBA Float Source #

cornsilk :: RGBA Float Source #

eggshell :: RGBA Float Source #

floralWhite :: RGBA Float Source #

gainsboro :: RGBA Float Source #

ghostWhite :: RGBA Float Source #

honeydew :: RGBA Float Source #

ivory :: RGBA Float Source #

lavender :: RGBA Float Source #

lavenderBlush :: RGBA Float Source #

lemonChiffon :: RGBA Float Source #

linen :: RGBA Float Source #

mintCream :: RGBA Float Source #

mistyRose :: RGBA Float Source #

moccasin :: RGBA Float Source #

navajoWhite :: RGBA Float Source #

oldLace :: RGBA Float Source #

papayaWhip :: RGBA Float Source #

peachPuff :: RGBA Float Source #

seashell :: RGBA Float Source #

snow :: RGBA Float Source #

thistle :: RGBA Float Source #

titaniumWhite :: RGBA Float Source #

wheat :: RGBA Float Source #

white :: RGBA Float Source #

whiteSmoke :: RGBA Float Source #

zincWhite :: RGBA Float Source #

coldGrey :: RGBA Float Source #

dimGrey :: RGBA Float Source #

grey :: RGBA Float Source #

lightGrey :: RGBA Float Source #

slateGrey :: RGBA Float Source #

slateGreyDark :: RGBA Float Source #

slateGreyLight :: RGBA Float Source #

warmGrey :: RGBA Float Source #

black :: RGBA Float Source #

ivoryBlack :: RGBA Float Source #

lampBlack :: RGBA Float Source #

alizarinCrimson :: RGBA Float Source #

brick :: RGBA Float Source #

cadmiumRedDeep :: RGBA Float Source #

coral :: RGBA Float Source #

coralLight :: RGBA Float Source #

deepPink :: RGBA Float Source #

englishRed :: RGBA Float Source #

firebrick :: RGBA Float Source #

geraniumLake :: RGBA Float Source #

hotPink :: RGBA Float Source #

indianRed :: RGBA Float Source #

lightSalmon :: RGBA Float Source #

madderLakeDeep :: RGBA Float Source #

maroon :: RGBA Float Source #

pink :: RGBA Float Source #

pinkLight :: RGBA Float Source #

raspberry :: RGBA Float Source #

red :: RGBA Float Source #

roseMadder :: RGBA Float Source #

salmon :: RGBA Float Source #

tomato :: RGBA Float Source #

venetianRed :: RGBA Float Source #

beige :: RGBA Float Source #

brown :: RGBA Float Source #

brownMadder :: RGBA Float Source #

brownOchre :: RGBA Float Source #

burlywood :: RGBA Float Source #

burntSienna :: RGBA Float Source #

burntUmber :: RGBA Float Source #

chocolate :: RGBA Float Source #

deepOchre :: RGBA Float Source #

flesh :: RGBA Float Source #

fleshOchre :: RGBA Float Source #

goldOchre :: RGBA Float Source #

greenishUmber :: RGBA Float Source #

khaki :: RGBA Float Source #

khakiDark :: RGBA Float Source #

lightBeige :: RGBA Float Source #

peru :: RGBA Float Source #

rosyBrown :: RGBA Float Source #

rawSienna :: RGBA Float Source #

rawUmber :: RGBA Float Source #

sepia :: RGBA Float Source #

sienna :: RGBA Float Source #

saddleBrown :: RGBA Float Source #

sandyBrown :: RGBA Float Source #

tan :: RGBA Float Source #

vanDykeBrown :: RGBA Float Source #

cadmiumOrange :: RGBA Float Source #

cadmiumRedLight :: RGBA Float Source #

carrot :: RGBA Float Source #

darkOrange :: RGBA Float Source #

marsOrange :: RGBA Float Source #

marsYellow :: RGBA Float Source #

orange :: RGBA Float Source #

orangeRed :: RGBA Float Source #

yellowOchre :: RGBA Float Source #

aureolineYellow :: RGBA Float Source #

banana :: RGBA Float Source #

cadmiumLemon :: RGBA Float Source #

cadmiumYellow :: RGBA Float Source #

gold :: RGBA Float Source #

goldenrod :: RGBA Float Source #

goldenrodDark :: RGBA Float Source #

goldenrodLight :: RGBA Float Source #

goldenrodPale :: RGBA Float Source #

lightGoldenrod :: RGBA Float Source #

melon :: RGBA Float Source #

naplesYellowDeep :: RGBA Float Source #

yellow :: RGBA Float Source #

yellowLight :: RGBA Float Source #

chartreuse :: RGBA Float Source #

chromeoxideGreen :: RGBA Float Source #

cinnabarGreen :: RGBA Float Source #

cobaltGreen :: RGBA Float Source #

emeraldGreen :: RGBA Float Source #

forestGreen :: RGBA Float Source #

green :: RGBA Float Source #

greenDark :: RGBA Float Source #

greenPale :: RGBA Float Source #

greenYellow :: RGBA Float Source #

lawnGreen :: RGBA Float Source #

limeGreen :: RGBA Float Source #

mint :: RGBA Float Source #

olive :: RGBA Float Source #

oliveDrab :: RGBA Float Source #

oliveGreenDark :: RGBA Float Source #

permanentGreen :: RGBA Float Source #

sapGreen :: RGBA Float Source #

seaGreen :: RGBA Float Source #

seaGreenDark :: RGBA Float Source #

seaGreenMedium :: RGBA Float Source #

seaGreenLight :: RGBA Float Source #

springGreen :: RGBA Float Source #

springGreenMedium :: RGBA Float Source #

terreVerte :: RGBA Float Source #

viridianLight :: RGBA Float Source #

yellowGreen :: RGBA Float Source #

aquamarine :: RGBA Float Source #

aquamarineMedium :: RGBA Float Source #

cyan :: RGBA Float Source #

cyanWhite :: RGBA Float Source #

turquoise :: RGBA Float Source #

turquoiseDark :: RGBA Float Source #

turquoiseMedium :: RGBA Float Source #

turquoisePale :: RGBA Float Source #

aliceBlue :: RGBA Float Source #

blue :: RGBA Float Source #

blueLight :: RGBA Float Source #

blueMedium :: RGBA Float Source #

cadet :: RGBA Float Source #

cobalt :: RGBA Float Source #

cornflower :: RGBA Float Source #

cerulean :: RGBA Float Source #

dodgerBlue :: RGBA Float Source #

indigo :: RGBA Float Source #

manganeseBlue :: RGBA Float Source #

midnightBlue :: RGBA Float Source #

navy :: RGBA Float Source #

peacock :: RGBA Float Source #

powderBlue :: RGBA Float Source #

royalBlue :: RGBA Float Source #

slateBlue :: RGBA Float Source #

slateBlueDark :: RGBA Float Source #

slateBlueLight :: RGBA Float Source #

slateBlueMedium :: RGBA Float Source #

skyBlue :: RGBA Float Source #

skyBlueDeep :: RGBA Float Source #

skyBlueLight :: RGBA Float Source #

steelBlue :: RGBA Float Source #

steelBlueLight :: RGBA Float Source #

turquoiseBlue :: RGBA Float Source #

ultramarine :: RGBA Float Source #

blueViolet :: RGBA Float Source #

cobaltVioletDeep :: RGBA Float Source #

magenta :: RGBA Float Source #

orchid :: RGBA Float Source #

orchidDark :: RGBA Float Source #

orchidMedium :: RGBA Float Source #

permanentViolet :: RGBA Float Source #

plum :: RGBA Float Source #

purple :: RGBA Float Source #

purpleMedium :: RGBA Float Source #

ultramarineViolet :: RGBA Float Source #

violet :: RGBA Float Source #

violetDark :: RGBA Float Source #

violetRed :: RGBA Float Source #

violetRedMedium :: RGBA Float Source #

violetRedPale :: RGBA Float Source #

NamedColour (RGBA Word8) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

Methods

antiqueWhite :: RGBA Word8 Source #

azure :: RGBA Word8 Source #

bisque :: RGBA Word8 Source #

blanchedAlmond :: RGBA Word8 Source #

cornsilk :: RGBA Word8 Source #

eggshell :: RGBA Word8 Source #

floralWhite :: RGBA Word8 Source #

gainsboro :: RGBA Word8 Source #

ghostWhite :: RGBA Word8 Source #

honeydew :: RGBA Word8 Source #

ivory :: RGBA Word8 Source #

lavender :: RGBA Word8 Source #

lavenderBlush :: RGBA Word8 Source #

lemonChiffon :: RGBA Word8 Source #

linen :: RGBA Word8 Source #

mintCream :: RGBA Word8 Source #

mistyRose :: RGBA Word8 Source #

moccasin :: RGBA Word8 Source #

navajoWhite :: RGBA Word8 Source #

oldLace :: RGBA Word8 Source #

papayaWhip :: RGBA Word8 Source #

peachPuff :: RGBA Word8 Source #

seashell :: RGBA Word8 Source #

snow :: RGBA Word8 Source #

thistle :: RGBA Word8 Source #

titaniumWhite :: RGBA Word8 Source #

wheat :: RGBA Word8 Source #

white :: RGBA Word8 Source #

whiteSmoke :: RGBA Word8 Source #

zincWhite :: RGBA Word8 Source #

coldGrey :: RGBA Word8 Source #

dimGrey :: RGBA Word8 Source #

grey :: RGBA Word8 Source #

lightGrey :: RGBA Word8 Source #

slateGrey :: RGBA Word8 Source #

slateGreyDark :: RGBA Word8 Source #

slateGreyLight :: RGBA Word8 Source #

warmGrey :: RGBA Word8 Source #

black :: RGBA Word8 Source #

ivoryBlack :: RGBA Word8 Source #

lampBlack :: RGBA Word8 Source #

alizarinCrimson :: RGBA Word8 Source #

brick :: RGBA Word8 Source #

cadmiumRedDeep :: RGBA Word8 Source #

coral :: RGBA Word8 Source #

coralLight :: RGBA Word8 Source #

deepPink :: RGBA Word8 Source #

englishRed :: RGBA Word8 Source #

firebrick :: RGBA Word8 Source #

geraniumLake :: RGBA Word8 Source #

hotPink :: RGBA Word8 Source #

indianRed :: RGBA Word8 Source #

lightSalmon :: RGBA Word8 Source #

madderLakeDeep :: RGBA Word8 Source #

maroon :: RGBA Word8 Source #

pink :: RGBA Word8 Source #

pinkLight :: RGBA Word8 Source #

raspberry :: RGBA Word8 Source #

red :: RGBA Word8 Source #

roseMadder :: RGBA Word8 Source #

salmon :: RGBA Word8 Source #

tomato :: RGBA Word8 Source #

venetianRed :: RGBA Word8 Source #

beige :: RGBA Word8 Source #

brown :: RGBA Word8 Source #

brownMadder :: RGBA Word8 Source #

brownOchre :: RGBA Word8 Source #

burlywood :: RGBA Word8 Source #

burntSienna :: RGBA Word8 Source #

burntUmber :: RGBA Word8 Source #

chocolate :: RGBA Word8 Source #

deepOchre :: RGBA Word8 Source #

flesh :: RGBA Word8 Source #

fleshOchre :: RGBA Word8 Source #

goldOchre :: RGBA Word8 Source #

greenishUmber :: RGBA Word8 Source #

khaki :: RGBA Word8 Source #

khakiDark :: RGBA Word8 Source #

lightBeige :: RGBA Word8 Source #

peru :: RGBA Word8 Source #

rosyBrown :: RGBA Word8 Source #

rawSienna :: RGBA Word8 Source #

rawUmber :: RGBA Word8 Source #

sepia :: RGBA Word8 Source #

sienna :: RGBA Word8 Source #

saddleBrown :: RGBA Word8 Source #

sandyBrown :: RGBA Word8 Source #

tan :: RGBA Word8 Source #

vanDykeBrown :: RGBA Word8 Source #

cadmiumOrange :: RGBA Word8 Source #

cadmiumRedLight :: RGBA Word8 Source #

carrot :: RGBA Word8 Source #

darkOrange :: RGBA Word8 Source #

marsOrange :: RGBA Word8 Source #

marsYellow :: RGBA Word8 Source #

orange :: RGBA Word8 Source #

orangeRed :: RGBA Word8 Source #

yellowOchre :: RGBA Word8 Source #

aureolineYellow :: RGBA Word8 Source #

banana :: RGBA Word8 Source #

cadmiumLemon :: RGBA Word8 Source #

cadmiumYellow :: RGBA Word8 Source #

gold :: RGBA Word8 Source #

goldenrod :: RGBA Word8 Source #

goldenrodDark :: RGBA Word8 Source #

goldenrodLight :: RGBA Word8 Source #

goldenrodPale :: RGBA Word8 Source #

lightGoldenrod :: RGBA Word8 Source #

melon :: RGBA Word8 Source #

naplesYellowDeep :: RGBA Word8 Source #

yellow :: RGBA Word8 Source #

yellowLight :: RGBA Word8 Source #

chartreuse :: RGBA Word8 Source #

chromeoxideGreen :: RGBA Word8 Source #

cinnabarGreen :: RGBA Word8 Source #

cobaltGreen :: RGBA Word8 Source #

emeraldGreen :: RGBA Word8 Source #

forestGreen :: RGBA Word8 Source #

green :: RGBA Word8 Source #

greenDark :: RGBA Word8 Source #

greenPale :: RGBA Word8 Source #

greenYellow :: RGBA Word8 Source #

lawnGreen :: RGBA Word8 Source #

limeGreen :: RGBA Word8 Source #

mint :: RGBA Word8 Source #

olive :: RGBA Word8 Source #

oliveDrab :: RGBA Word8 Source #

oliveGreenDark :: RGBA Word8 Source #

permanentGreen :: RGBA Word8 Source #

sapGreen :: RGBA Word8 Source #

seaGreen :: RGBA Word8 Source #

seaGreenDark :: RGBA Word8 Source #

seaGreenMedium :: RGBA Word8 Source #

seaGreenLight :: RGBA Word8 Source #

springGreen :: RGBA Word8 Source #

springGreenMedium :: RGBA Word8 Source #

terreVerte :: RGBA Word8 Source #

viridianLight :: RGBA Word8 Source #

yellowGreen :: RGBA Word8 Source #

aquamarine :: RGBA Word8 Source #

aquamarineMedium :: RGBA Word8 Source #

cyan :: RGBA Word8 Source #

cyanWhite :: RGBA Word8 Source #

turquoise :: RGBA Word8 Source #

turquoiseDark :: RGBA Word8 Source #

turquoiseMedium :: RGBA Word8 Source #

turquoisePale :: RGBA Word8 Source #

aliceBlue :: RGBA Word8 Source #

blue :: RGBA Word8 Source #

blueLight :: RGBA Word8 Source #

blueMedium :: RGBA Word8 Source #

cadet :: RGBA Word8 Source #

cobalt :: RGBA Word8 Source #

cornflower :: RGBA Word8 Source #

cerulean :: RGBA Word8 Source #

dodgerBlue :: RGBA Word8 Source #

indigo :: RGBA Word8 Source #

manganeseBlue :: RGBA Word8 Source #

midnightBlue :: RGBA Word8 Source #

navy :: RGBA Word8 Source #

peacock :: RGBA Word8 Source #

powderBlue :: RGBA Word8 Source #

royalBlue :: RGBA Word8 Source #

slateBlue :: RGBA Word8 Source #

slateBlueDark :: RGBA Word8 Source #

slateBlueLight :: RGBA Word8 Source #

slateBlueMedium :: RGBA Word8 Source #

skyBlue :: RGBA Word8 Source #

skyBlueDeep :: RGBA Word8 Source #

skyBlueLight :: RGBA Word8 Source #

steelBlue :: RGBA Word8 Source #

steelBlueLight :: RGBA Word8 Source #

turquoiseBlue :: RGBA Word8 Source #

ultramarine :: RGBA Word8 Source #

blueViolet :: RGBA Word8 Source #

cobaltVioletDeep :: RGBA Word8 Source #

magenta :: RGBA Word8 Source #

orchid :: RGBA Word8 Source #

orchidDark :: RGBA Word8 Source #

orchidMedium :: RGBA Word8 Source #

permanentViolet :: RGBA Word8 Source #

plum :: RGBA Word8 Source #

purple :: RGBA Word8 Source #

purpleMedium :: RGBA Word8 Source #

ultramarineViolet :: RGBA Word8 Source #

violet :: RGBA Word8 Source #

violetDark :: RGBA Word8 Source #

violetRed :: RGBA Word8 Source #

violetRedMedium :: RGBA Word8 Source #

violetRedPale :: RGBA Word8 Source #

type Rep (RGBA a) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

type EltR (RGBA Float) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

type EltR (RGBA Float) = Vec4 Float
type EltR (RGBA Word8) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

type EltR (RGBA Word8) = Vec4 Word8
type Plain (RGBA Float) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

type Plain (RGBA Word8) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

type Plain (RGBA (Exp Float)) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

type Plain (RGBA (Exp Word8)) Source # 
Instance details

Defined in Data.Array.Accelerate.Data.Colour.RGBA

pattern RGBA_ :: (Elt (RGBA a), Elt a, VecElt a, EltR (RGBA a) ~ Vec4 a) => Exp a -> Exp a -> Exp a -> Exp a -> Exp (RGBA a) Source #

rgba Source #

Arguments

:: Exp Float

red component

-> Exp Float

green component

-> Exp Float

blue component

-> Exp Float

alpha component

-> Exp Colour 

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

rgba8 Source #

Arguments

:: Exp Word8

red component

-> Exp Word8

green component

-> Exp Word8

blue component

-> Exp Word8

alpha component

-> Exp Colour 

Construct a colour from 8-bits-per-channel colour components.

clamp :: Exp Colour -> Exp Colour Source #

Clamp each component to the range [0..1]

blend Source #

Arguments

:: Exp Float

Proportion of first colour

-> Exp Float

Proportion of second colour

-> Exp Colour

First colour

-> Exp Colour

Second colour

-> Exp Colour

Resulting colour

Blend two colours in the given proportions.

Note that this uses an approximation of gamma=2 (i.e. sum-of-squares method). It is recommended to instead convert to the sRGB colour space if you want more accurate colour blending, or if you intend to use the gamma-corrected values more than once (e.g. in a stencil).

blend c1 c2 ~= SRGB.toRGB ( (SRGB.fromRGB c1 + SRGB.fromRGB c2) / 2 )

See the Blur program in the examples for a comparison of mixing colours in the RGB and sRGB colour spaces.

luminance :: Exp Colour -> Exp Float Source #

Luminance of an RGB colour (Y component of a YUV colour).

opacity :: Exp Float -> Exp Colour -> Exp Colour Source #

Set the opacity of the given colour. The opacity is clamped to the range [0..1].

opaque :: Exp Colour -> Exp Colour Source #

A completely opaque colour

transparent :: Exp Colour -> Exp Colour Source #

Make colour transparent

packRGBA :: Exp Colour -> Exp Word32 Source #

Convert a Colour into a packed-word RGBA representation

packABGR :: Exp Colour -> Exp Word32 Source #

Convert a colour into a packed-word ABGR representation

unpackRGBA :: Exp Word32 -> Exp Colour Source #

Convert a colour from a packed-word RGBA representation

unpackABGR :: Exp Word32 -> Exp Colour Source #

Convert a colour from a packed-word ABGR representation