miniBill / elm-oklch / Color.LinearRGB

Types


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

Represents a color in the linear RGB space.

All components range from 0.0 to 1.0 (inclusive).

Creating colors

linearRgb : Basics.Float -> Basics.Float -> Basics.Float -> LinearRGB

Builds a color from red, green and blue components.

All components range from 0.0 to 1.0 (inclusive).

linearRgba : Basics.Float -> Basics.Float -> Basics.Float -> Basics.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).