union-color-0.1.2.1: Unify verious color formats
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Color.Internal

Synopsis

Alpha

data Alpha d Source #

Instances

Instances details
Show d => Show (Alpha d) Source # 
Instance details

Defined in Data.Color.Internal

Methods

showsPrec :: Int -> Alpha d -> ShowS #

show :: Alpha d -> String #

showList :: [Alpha d] -> ShowS #

pattern AlphaWord8 :: RealFrac d => Word8 -> Alpha d Source #

pattern AlphaWord16 :: RealFrac d => Word16 -> Alpha d Source #

pattern AlphaWord32 :: RealFrac d => Word32 -> Alpha d Source #

pattern AlphaInt32 :: RealFrac d => Int32 -> Alpha d Source #

pattern AlphaDouble :: Fractional d => d -> Alpha d Source #

alphaDouble :: (Ord d, Num d) => d -> Maybe (Alpha d) Source #

RGB

data Rgb d Source #

Instances

Instances details
Show d => Show (Rgb d) Source # 
Instance details

Defined in Data.Color.Internal

Methods

showsPrec :: Int -> Rgb d -> ShowS #

show :: Rgb d -> String #

showList :: [Rgb d] -> ShowS #

pattern RgbWord8 :: RealFrac d => Word8 -> Word8 -> Word8 -> Rgb d Source #

pattern RgbWord16 :: RealFrac d => Word16 -> Word16 -> Word16 -> Rgb d Source #

pattern RgbWord32 :: RealFrac d => Word32 -> Word32 -> Word32 -> Rgb d Source #

pattern RgbInt32 :: RealFrac d => Int32 -> Int32 -> Int32 -> Rgb d Source #

pattern RgbDouble :: Fractional d => d -> d -> d -> Rgb d Source #

rgbDouble :: (Ord d, Num d) => d -> d -> d -> Maybe (Rgb d) Source #

rgbRealToFrac :: (Real d, Fractional d') => Rgb d -> Rgb d' Source #

RGBA

Straight

pattern RgbaWord8 :: RealFrac d => Word8 -> Word8 -> Word8 -> Word8 -> Rgba d Source #

pattern RgbaWord16 :: RealFrac d => Word16 -> Word16 -> Word16 -> Word16 -> Rgba d Source #

pattern RgbaWord32 :: RealFrac d => Word32 -> Word32 -> Word32 -> Word32 -> Rgba d Source #

pattern RgbaInt32 :: RealFrac d => Int32 -> Int32 -> Int32 -> Int32 -> Rgba d Source #

pattern RgbaDouble :: (Eq d, Fractional d) => d -> d -> d -> d -> Rgba d Source #

rgbaDouble :: (Ord d, Num d) => d -> d -> d -> d -> Maybe (Rgba d) Source #

Premultiplied

pattern RgbaPremultipliedDouble :: (Eq d, Fractional d) => d -> d -> d -> d -> Rgba d Source #

rgbaPremultipliedDouble :: (Ord d, Num d) => d -> d -> d -> d -> Maybe (Rgba d) Source #

From and To Rgb and Alpha

toRgba :: RealFrac d => Rgb d -> Alpha d -> Rgba d Source #

fromRgba :: (Eq d, Fractional d) => Rgba d -> (Rgb d, Alpha d) Source #

Convert Fractional