yampa-sdl2-0.1.0.2: Yampa and SDL2 made easy

Data.Colour.RGBSpace.HSV

Synopsis

Documentation

data RGB a Source #

An RGB triple for an unspecified colour space.

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 #

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

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

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 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 Source #

Returns the value coordinate of an RGB triple for the HSV (hue-saturation-value) system.

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

Convert HSV (hue-saturation-value) coordinates to an RGB value. Hue is expected to be measured in degrees.