colour-2.3.5: A model for human colour/color perception

Safe HaskellSafe
LanguageHaskell98

Data.Colour.RGBSpace.HSL

Synopsis

Documentation

data RGB a Source #

An RGB triple for an unspecified colour space.

Instances
Functor RGB Source # 
Instance details

Defined in Data.Colour.RGB

Methods

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

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

Applicative RGB Source # 
Instance details

Defined in Data.Colour.RGB

Methods

pure :: a -> RGB a #

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

liftA2 :: (a -> b -> c) -> RGB a -> RGB b -> RGB c #

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

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

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

Defined in Data.Colour.RGB

Methods

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

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

Read a => Read (RGB a) Source # 
Instance details

Defined in Data.Colour.RGB

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

Defined in Data.Colour.RGB

Methods

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

show :: RGB a -> String #

showList :: [RGB a] -> ShowS #

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

Returns the HSL (hue-saturation-lightness) coordinates of an RGB triple. See hue, saturation, and lightness.

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.

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

Returns the saturation coordinate (range [0, 1]) of an RGB triple for the HSL (hue-saturation-lightness) system. Note: This is different from saturation for the Data.Colour.RGBSpace.HSV

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

Returns the lightness coordinate (range [0, 1]) of an RGB triple for the HSL (hue-saturation-lightness) system.

hsl :: (RealFrac a, Ord a) => a -> a -> a -> RGB a Source #

Convert HSL (hue-saturation-lightness) coordinates to an RGB value. Hue is expected to be measured in degrees [0,360], while saturation and lightness are expected to be in the closed range [0,1].