hsluv-haskell-0.1.0.0: HSLuv conversion utility.

Safe HaskellSafe
LanguageHaskell2010

HSLuv

Description

Haskell port of the perceptually-uniform HSLuv colorspace model (http:/www.hsluv.org).

Synopsis

Documentation

newtype RGBRed Source #

Value in [0, 1].

Constructors

RGBRed Double 

Instances

newtype RGBGreen Source #

Value in [0, 1].

Constructors

RGBGreen Double 

newtype RGBBlue Source #

Value in [0, 1].

Constructors

RGBBlue Double 

data RGB Source #

Values in [0, 1].

Constructors

RGB RGBRed RGBGreen RGBBlue 

Instances

Eq RGB Source # 

Methods

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

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

Show RGB Source # 

Methods

showsPrec :: Int -> RGB -> ShowS #

show :: RGB -> String #

showList :: [RGB] -> ShowS #

newtype XYZX Source #

Value in [0, 1].

Constructors

XYZX Double 

Instances

Eq XYZX Source # 

Methods

(==) :: XYZX -> XYZX -> Bool #

(/=) :: XYZX -> XYZX -> Bool #

Show XYZX Source # 

Methods

showsPrec :: Int -> XYZX -> ShowS #

show :: XYZX -> String #

showList :: [XYZX] -> ShowS #

newtype XYZY Source #

Value in [0, 1].

Constructors

XYZY Double 

Instances

Eq XYZY Source # 

Methods

(==) :: XYZY -> XYZY -> Bool #

(/=) :: XYZY -> XYZY -> Bool #

Show XYZY Source # 

Methods

showsPrec :: Int -> XYZY -> ShowS #

show :: XYZY -> String #

showList :: [XYZY] -> ShowS #

newtype XYZZ Source #

Value in [0, 1].

Constructors

XYZZ Double 

Instances

Eq XYZZ Source # 

Methods

(==) :: XYZZ -> XYZZ -> Bool #

(/=) :: XYZZ -> XYZZ -> Bool #

Show XYZZ Source # 

Methods

showsPrec :: Int -> XYZZ -> ShowS #

show :: XYZZ -> String #

showList :: [XYZZ] -> ShowS #

data XYZ Source #

Values in [0, 1].

Constructors

XYZ XYZX XYZY XYZZ 

Instances

Eq XYZ Source # 

Methods

(==) :: XYZ -> XYZ -> Bool #

(/=) :: XYZ -> XYZ -> Bool #

Show XYZ Source # 

Methods

showsPrec :: Int -> XYZ -> ShowS #

show :: XYZ -> String #

showList :: [XYZ] -> ShowS #

newtype LUVU Source #

Constructors

LUVU Double 

Instances

Eq LUVU Source # 

Methods

(==) :: LUVU -> LUVU -> Bool #

(/=) :: LUVU -> LUVU -> Bool #

Show LUVU Source # 

Methods

showsPrec :: Int -> LUVU -> ShowS #

show :: LUVU -> String #

showList :: [LUVU] -> ShowS #

newtype LUVV Source #

Constructors

LUVV Double 

Instances

Eq LUVV Source # 

Methods

(==) :: LUVV -> LUVV -> Bool #

(/=) :: LUVV -> LUVV -> Bool #

Show LUVV Source # 

Methods

showsPrec :: Int -> LUVV -> ShowS #

show :: LUVV -> String #

showList :: [LUVV] -> ShowS #

data LUV Source #

Constructors

LUV LUVLightness LUVU LUVV 

Instances

Eq LUV Source # 

Methods

(==) :: LUV -> LUV -> Bool #

(/=) :: LUV -> LUV -> Bool #

Show LUV Source # 

Methods

showsPrec :: Int -> LUV -> ShowS #

show :: LUV -> String #

showList :: [LUV] -> ShowS #

newtype LCHHue Source #

Constructors

LCHHue Double 

Instances

data LCH Source #

Instances

Eq LCH Source # 

Methods

(==) :: LCH -> LCH -> Bool #

(/=) :: LCH -> LCH -> Bool #

Show LCH Source # 

Methods

showsPrec :: Int -> LCH -> ShowS #

show :: LCH -> String #

showList :: [LCH] -> ShowS #

newtype HSLuvHue Source #

Value in [0, 360].

Constructors

HSLuvHue Double 

data HSLuv Source #

Values in [0, 360]; [0, 100]; [0, 100].

Instances

Eq HSLuv Source # 

Methods

(==) :: HSLuv -> HSLuv -> Bool #

(/=) :: HSLuv -> HSLuv -> Bool #

Show HSLuv Source # 

Methods

showsPrec :: Int -> HSLuv -> ShowS #

show :: HSLuv -> String #

showList :: [HSLuv] -> ShowS #

newtype HPLuvHue Source #

Value in [0, 360].

Constructors

HPLuvHue Double 

data HPLuv Source #

Values in [0, 360]; [0, 100]; [0, 100].

Instances

Eq HPLuv Source # 

Methods

(==) :: HPLuv -> HPLuv -> Bool #

(/=) :: HPLuv -> HPLuv -> Bool #

Show HPLuv Source # 

Methods

showsPrec :: Int -> HPLuv -> ShowS #

show :: HPLuv -> String #

showList :: [HPLuv] -> ShowS #

getBounds :: HSLuvLightness -> [Line] Source #

For a given lightness, return a list of 6 lines in slope-intercept form that represent the bounds in CIELUV, stepping over which will push a value out of the RGB gamut.

maxSafeChromaForL :: HSLuvLightness -> LCHChroma Source #

For given lightness, returns the maximum chroma. Keeping the chroma value below this number will ensure that for any hue, the color is within the RGB gamut.