Data.Colour.RGBSpace.HSV

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

Safe Haskell | Safe-Inferred
Language | Haskell98

Data.Colour.RGBSpace.HSV

Synopsis

- data RGB a
- hsvView :: (Fractional a, Ord a) => RGB a -> (a, a, a)
- hue :: (Fractional a, Ord a) => RGB a -> a
- saturation :: (Fractional a, Ord a) => RGB a -> a
- value :: (Fractional a, Ord a) => RGB a -> a
- hsv :: (RealFrac a, Ord a) => a -> a -> a -> RGB a

# Documentation

data RGB a #

An RGB triple for an unspecified colour space.

#### Instances

Instances details

Applicative RGB # |
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 #
Functor RGB # |
Instance details Defined in Data.Colour.RGB Methods fmap :: (a -> b) -> RGB a -> RGB b # (<$) :: a -> RGB b -> RGB a #
Read a => Read (RGB a) # |
Instance details Defined in Data.Colour.RGB Methods readsPrec :: Int -> ReadS (RGB a) # readList :: ReadS [RGB a] # readPrec :: ReadPrec (RGB a) # readListPrec :: ReadPrec [RGB a] #
Show a => Show (RGB a) # |
Instance details Defined in Data.Colour.RGB Methods showsPrec :: Int -> RGB a -> ShowS # show :: RGB a -> String # showList :: [RGB a] -> ShowS #
Eq a => Eq (RGB a) # |
Instance details Defined in Data.Colour.RGB Methods (==) :: RGB a -> RGB a -> Bool # (/=) :: RGB a -> RGB a -> Bool #

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

Returns the HSV (hue-saturation-value) coordinates of an `RGB` triple. See `hue`, `saturation`, and `value`.

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

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 #

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

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

Returns the value coordinate (raonge [0,1]) of an `RGB` triple for the HSV (hue-saturation-value) system.

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

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