kuon/elm-hsluv/3.0.2

HSLuv

Convert color between HSLuv and RGB spaces

This package uses an internal color representation to limit the number of conversion to the minimum.

If you create a color with the hsluv constructor and then manipulate it with the HSLuv.Manipulate module, there will be no new conversion.

Colors

type alias HSLuv =
HSLuv

Opaque color type

Create colors (constructors)

{ hue : Float
, saturation : Float
, lightness : Float
, alpha : Float
}
-> HSLuv

hsluv create a Color with normalized HSLuv components (0->1) and an alpha channel

{ hue : Float
, saturation : Float
, lightness : Float
, alpha : Float
}
-> HSLuv

hsluv360 creates an HSLuv with components and an alpha channel

- hue range is 0->360
- saturation range is 0->100
- lightness range is 0->100
- alpha range is 0->1
{ red : Float
, green : Float
, blue : Float
, alpha : Float
}
-> HSLuv

rgba creates an HSLuv with normalized RGB components (0->1) and an alpha channel

color : Color -> HSLuv

color creates an HSLuv with a Color

Convert colors (extractors)

HSLuv
-> { hue : Float
, saturation : Float
, lightness : Float
, alpha : Float
}

toHsluv extract the normalized components of an HSLuv

toColor : HSLuv -> Color

toColor convert an HSLuv color to a Color

HSLuv
-> { red : Float
, green : Float
, blue : Float
, alpha : Float
}

toRgb extract the normalized components of a color in the RGBA format

Low level functions

hsluvToRgb : Vec3 -> Vec3

hsluvToRgb convert HSLuv components to RGB

hpluvToRgb : Vec3 -> Vec3

hpluvToRgb convert HSLuv components to RGB

rgbToHsluv : Vec3 -> Vec3

rgbToHsluv convert RGB components to HSLuv

rgbToHpluv : Vec3 -> Vec3

rgbToHpluv convert RGB components to HSLuv

Low level intermediate conversion functions

lchToLuv : Vec3 -> Vec3

lchToLuv convert LCH components to LUV

luvToLch : Vec3 -> Vec3

luvToLch convert LUV components to LCH

xyzToRgb : Vec3 -> Vec3

xyzToRgb convert XYZ components to RGB

rgbToXyz : Vec3 -> Vec3

rgbToXyz convert RGB components to XYZ

xyzToLuv : Vec3 -> Vec3

xyzToLuv convert XYZ components to LUV

luvToXyz : Vec3 -> Vec3

luvToXyz convert LUV components to XYZ

hsluvToLch : Vec3 -> Vec3

hsluvToLch convert HSLuv components to LCH

lchToHsluv : Vec3 -> Vec3

lchToHsluv convert LCH components to HSLuv

hpluvToLch : Vec3 -> Vec3

hpluvToLch convert HPLuv components to LCH

lchToHpluv : Vec3 -> Vec3

lchToHpluv convert LCH components to HPLuv