Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Haskell port of the perceptually-uniform HSLuv colorspace model (http:/www.hsluv.org).
- newtype RGBRed = RGBRed Double
- newtype RGBGreen = RGBGreen Double
- newtype RGBBlue = RGBBlue Double
- data RGB = RGB RGBRed RGBGreen RGBBlue
- newtype XYZX = XYZX Double
- newtype XYZY = XYZY Double
- newtype XYZZ = XYZZ Double
- data XYZ = XYZ XYZX XYZY XYZZ
- newtype LUVLightness = LUVLightness Double
- newtype LUVU = LUVU Double
- newtype LUVV = LUVV Double
- data LUV = LUV LUVLightness LUVU LUVV
- newtype LCHLightness = LCHLightness Double
- newtype LCHChroma = LCHChroma Double
- newtype LCHHue = LCHHue Double
- data LCH = LCH LCHLightness LCHChroma LCHHue
- newtype HSLuvHue = HSLuvHue Double
- newtype HSLuvSaturation = HSLuvSaturation Double
- newtype HSLuvLightness = HSLuvLightness Double
- data HSLuv = HSLuv HSLuvHue HSLuvSaturation HSLuvLightness
- newtype HPLuvHue = HPLuvHue Double
- newtype HPLuvPastel = HPLuvPastel Double
- newtype HPLuvLightness = HPLuvLightness Double
- data HPLuv = HPLuv HPLuvHue HPLuvPastel HPLuvLightness
- getBounds :: HSLuvLightness -> [Line]
- maxSafeChromaForL :: HSLuvLightness -> LCHChroma
- maxChromaForLH :: HSLuvLightness -> HSLuvHue -> LCHChroma
- xyzToRgb :: XYZ -> RGB
- rgbToXyz :: RGB -> XYZ
- yToL :: XYZY -> LUVLightness
- lToY :: LUVLightness -> XYZY
- xyzToLuv :: XYZ -> LUV
- luvToXyz :: LUV -> XYZ
- luvToLch :: LUV -> LCH
- lchToLuv :: LCH -> LUV
- hsluvToLchWith :: (HSLuvLightness -> HSLuvHue -> LCHChroma) -> HSLuv -> LCH
- lchToHsluvWith :: (HSLuvLightness -> HSLuvHue -> LCHChroma) -> LCH -> HSLuv
- hsluvToLch :: HSLuv -> LCH
- lchToHsluv :: LCH -> HSLuv
- hpluvToLch :: HPLuv -> LCH
- lchToHpluv :: LCH -> HPLuv
- rgbToHex :: RGB -> String
- hexToRgb :: String -> Maybe RGB
- lchToRgb :: LCH -> RGB
- rgbToLch :: RGB -> LCH
- hsluvToRgb :: HSLuv -> RGB
- rgbToHsluv :: RGB -> HSLuv
- hpluvToRgb :: HPLuv -> RGB
- rgbToHpluv :: RGB -> HPLuv
- hsluvToHex :: HSLuv -> String
- hpluvToHex :: HPLuv -> String
- hexToHsluv :: String -> Maybe HSLuv
- hexToHpluv :: String -> Maybe HPLuv
- hsluvToColour :: HSLuv -> Colour Double
- colourToHsluv :: Colour Double -> HSLuv
- hpluvToColour :: HPLuv -> Colour Double
- colourToHpluv :: Colour Double -> HPLuv
Documentation
Value in [0, 1].
newtype LUVLightness Source #
newtype LCHLightness Source #
Value in [0, 360].
newtype HSLuvSaturation Source #
Value in [0, 100].
newtype HSLuvLightness Source #
Value in [0, 100].
Values in [0, 360]; [0, 100]; [0, 100].
Value in [0, 360].
newtype HPLuvPastel Source #
Value in [0, 100].
newtype HPLuvLightness Source #
Value in [0, 100].
Values in [0, 360]; [0, 100]; [0, 100].
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.
maxChromaForLH :: HSLuvLightness -> HSLuvHue -> LCHChroma Source #
yToL :: XYZY -> LUVLightness Source #
lToY :: LUVLightness -> XYZY Source #
hsluvToLchWith :: (HSLuvLightness -> HSLuvHue -> LCHChroma) -> HSLuv -> LCH Source #
lchToHsluvWith :: (HSLuvLightness -> HSLuvHue -> LCHChroma) -> LCH -> HSLuv Source #
hsluvToLch :: HSLuv -> LCH Source #
lchToHsluv :: LCH -> HSLuv Source #
hpluvToLch :: HPLuv -> LCH Source #
lchToHpluv :: LCH -> HPLuv Source #
hsluvToRgb :: HSLuv -> RGB Source #
rgbToHsluv :: RGB -> HSLuv Source #
hpluvToRgb :: HPLuv -> RGB Source #
rgbToHpluv :: RGB -> HPLuv Source #
hsluvToHex :: HSLuv -> String Source #
hpluvToHex :: HPLuv -> String Source #