kuon/elm-hsluv/2.2.0

NOTE: the latest version is 3.0.2

HSLuv.Manipulate

Manipulate colors

This module let you manipulate the Color type.

Set components

setRed : Float -> Color -> Color

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

setGreen : Float -> Color -> Color

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

setBlue : Float -> Color -> Color

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

setHue : Float -> Color -> Color

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

setLightness : Float -> Color -> Color

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

setSaturation : Float -> Color -> Color

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

setAlpha : Float -> Color -> Color

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

Multiply components

multRed : Float -> Color -> Color

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

multGreen : Float -> Color -> Color

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

multBlue : Float -> Color -> Color

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

multHue : Float -> Color -> Color

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

multLightness : Float -> Color -> Color

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

multSaturation : Float -> Color -> Color

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

multAlpha : Float -> Color -> Color

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

Map components

mapRed : (Float -> Float) -> Color -> Color

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

mapGreen : (Float -> Float) -> Color -> Color

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

mapBlue : (Float -> Float) -> Color -> Color

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

mapHue : (Float -> Float) -> Color -> Color

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

mapLightness : (Float -> Float) -> Color -> Color

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

mapSaturation : (Float -> Float) -> Color -> Color

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

mapAlpha : (Float -> Float) -> Color -> Color

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