yampa-sdl2-0.1.0.2: Yampa and SDL2 made easy

Safe HaskellSafe
LanguageHaskell2010

Data.Colour.RGB

Synopsis

Documentation

data RGB a Source #

An RGB triple for an unspecified colour space.

Constructors

RGB 

Fields

Instances

Functor RGB Source # 

Methods

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

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

Applicative RGB Source # 

Methods

pure :: a -> RGB a #

(<*>) :: RGB (a -> b) -> RGB a -> RGB b #

(*>) :: RGB a -> RGB b -> RGB b #

(<*) :: RGB a -> RGB b -> RGB a #

Eq a => Eq (RGB a) Source # 

Methods

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

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

Read a => Read (RGB a) Source # 
Show a => Show (RGB a) Source # 

Methods

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

show :: RGB a -> String #

showList :: [RGB a] -> ShowS #

uncurryRGB :: (a -> a -> a -> b) -> RGB a -> b Source #

Uncurries a function expecting three r, g, b parameters.

curryRGB :: (RGB a -> b) -> a -> a -> a -> b Source #

Curries a function expecting one RGB parameter.

data RGBGamut Source #

An RGBGamut is a 3-D colour “cube” that contains all the colours that can be displayed by a RGB device. The “cube” is normalized so that white has luminance 1.

mkRGBGamut Source #

Arguments

:: RGB (Chromaticity Rational)

The three primaries

-> Chromaticity Rational

The white point

-> RGBGamut 

An RGB gamut is specified by three primary colours (red, green, and blue) and a white point (often d65).

hslsv :: (Fractional a, Ord a) => RGB a -> (a, a, a, a, a) Source #

hue :: (Fractional a, Ord a) => RGB a -> a Source #

The hue coordinate of an RGB value is in degrees. Its value is always in the range 0-360.

mod1 :: RealFrac t => t -> t Source #