kuon/elm-hsluv/3.0.0

NOTE: the latest version is 3.0.2

HSLuv.Manipulate

Manipulate colors

This module let you manipulate the HSLuv type.

Set components

setRed : Float -> HSLuv -> HSLuv

Set the red channel of the color. Requires a value in the 0->1 range.

setGreen : Float -> HSLuv -> HSLuv

Set the green channel of the color. Requires a value in the 0->1 range.

setBlue : Float -> HSLuv -> HSLuv

Set the blue channel of the color. Requires a value in the 0->1 range.

setHue : Float -> HSLuv -> HSLuv

Set the hue of the color. Requires a value in the 0->1 range.

setLightness : Float -> HSLuv -> HSLuv

Set the lightness of the color. Requires a value in the 0->1 range.

setSaturation : Float -> HSLuv -> HSLuv

Set the saturation of the color. Requires a value in the 0->1 range.

setAlpha : Float -> HSLuv -> HSLuv

Set the alpha of the color. Requires a value in the 0->1 range.

Multiply components

multRed : Float -> HSLuv -> HSLuv

Multiply the red channel by the give factor. The result is clamped in the 0->1 range.

multGreen : Float -> HSLuv -> HSLuv

Multiply the green channel by the give factor. The result is clamped in the 0->1 range.

multBlue : Float -> HSLuv -> HSLuv

Multiply the blue channel by the give factor. The result is clamped in the 0->1 range.

multHue : Float -> HSLuv -> HSLuv

Multiply the hue by the give factor. The result is clamped in the 0->1 range.

multLightness : Float -> HSLuv -> HSLuv

Multiply the lightness by the give factor. The result is clamped in the 0->1 range.

multSaturation : Float -> HSLuv -> HSLuv

Multiply the saturation by the give factor. The result is clamped in the 0->1 range.

multAlpha : Float -> HSLuv -> HSLuv

Multiply the alpha by the give factor. The result is clamped in the 0->1 range.

Map components

mapRed : (Float -> Float) -> HSLuv -> HSLuv

Map the red channel with the given function. The result is clamped in the 0->1 range.

mapGreen : (Float -> Float) -> HSLuv -> HSLuv

Map the green channel with the given function. The result is clamped in the 0->1 range.

mapBlue : (Float -> Float) -> HSLuv -> HSLuv

Map the blue channel with the given function. The result is clamped in the 0->1 range.

mapHue : (Float -> Float) -> HSLuv -> HSLuv

Map the hue with the given function. The result is clamped in the 0->1 range.

mapLightness : (Float -> Float) -> HSLuv -> HSLuv

Map the lightness with the given function. The result is clamped in the 0->1 range.

mapSaturation : (Float -> Float) -> HSLuv -> HSLuv

Map the saturation with the given function. The result is clamped in the 0->1 range.

mapAlpha : (Float -> Float) -> HSLuv -> HSLuv

Map the alpha with the given function. The result is clamped in the 0->1 range.