yampa-sdl2-0.1.0.2: Yampa and SDL2 made easy

Data.Colour.RGB

Synopsis

Documentation

data RGB a Source #

An RGB triple for an unspecified colour space.

Constructors

 RGB FieldschannelRed :: !a channelGreen :: !a channelBlue :: !a

Instances

 Source # Methodsfmap :: (a -> b) -> RGB a -> RGB b #(<\$) :: a -> RGB b -> RGB a # Source # Methodspure :: 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 # MethodsreadsPrec :: Int -> ReadS (RGB a) #readList :: ReadS [RGB a] #readPrec :: ReadPrec (RGB a) # Show a => Show (RGB a) Source # MethodsshowsPrec :: 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.

Constructors

 RGBGamut Fieldsprimaries :: !(RGB (Chromaticity Rational)) whitePoint :: !(Chromaticity Rational)

Instances

 Source # Methods Source # Methods Source # MethodsshowList :: [RGBGamut] -> ShowS #

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 #