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.
Color.HSLuv
Opaque color type
hsluv : { hue : Basics.Float, saturation : Basics.Float, lightness : Basics.Float, alpha : Basics.Float } -> HSLuv
hsluv
create a Color with normalized HSLuv
components (0->1) and an alpha channel
hsluv360 : { hue : Basics.Float, saturation : Basics.Float, lightness : Basics.Float, alpha : Basics.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
rgba : { red : Basics.Float, green : Basics.Float, blue : Basics.Float, alpha : Basics.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
toHsluv : HSLuv -> { hue : Basics.Float, saturation : Basics.Float, lightness : Basics.Float, alpha : Basics.Float }
toHsluv
extract the normalized components of an HSLuv
toColor : HSLuv -> Color
toColor
convert an HSLuv color to a Color
toRgba : HSLuv -> { red : Basics.Float, green : Basics.Float, blue : Basics.Float, alpha : Basics.Float }
toRgb
extract the normalized components of a color in the RGBA format
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
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