kuon/elm-hsluv/2.1.0

NOTE: the latest version is 3.0.2

HSLuv

Convert color between HSLuv and RGB spaces

Colors

type alias Color =
Color

Opaque color type

Create colors (constructors)

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

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

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

hsluv360 create a Color with HSLuv 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
rgb :
{ red : Float
, green : Float
, blue : Float
, alpha : Float
}
-> Color

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

{ red : Int
, green : Int
, blue : Int
, alpha : Float
}
-> Color

rgb255 create a Color with RGB components (0->255) and an alpha channel (0->1)

Convert colors (extractors)

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

toHsluv extract the normalized components of a color in the HSLuv format

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

toHsluv360 extract the components of a color in the HSLuv format

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

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

Color
-> { red : Int
, green : Int
, blue : Int
, alpha : Float
}

toRgb255 extract the components of a color in the RGBA format (0->255)

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