miniBill/elm-oklch/1.1.0

Color.LinearRGB

Types

type alias LinearRGB =
{ linearRed : Float
, linearGreen : Float
, linearBlue : Float
, alpha : Float
}

Represents a color in the linear RGB space.

All components range from 0.0 to 1.0 (inclusive).

Creating colors

linearRgb : Float -> Float -> Float -> LinearRGB

Builds a color from red, green and blue components.

All components range from 0.0 to 1.0 (inclusive).

linearRgba : Float -> Float -> Float -> Float -> LinearRGB

Builds a color from red, green, blue and alpha components.

All components range from 0.0 to 1.0 (inclusive).

Conversions

fromColor : Color -> LinearRGB

Convert a color from Color (sRGB) to linear RGB.

All component range from 0.0 to 1.0 (inclusive).

toColor : LinearRGB -> Color

Convert a color from linear RGB to Color (sRGB).

All component range from 0.0 to 1.0 (inclusive).