Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Color = Color !CFloat !CFloat !CFloat !CFloat
- type ColorPtr = Ptr Color
- rgb :: CUChar -> CUChar -> CUChar -> Color
- rgbf :: CFloat -> CFloat -> CFloat -> Color
- rgba :: CUChar -> CUChar -> CUChar -> CUChar -> Color
- rgbaf :: CFloat -> CFloat -> CFloat -> CFloat -> Color
- lerpRGBA :: Color -> Color -> CFloat -> Color
- transRGBA :: Color -> CUChar -> Color
- transRGBAf :: Color -> CFloat -> Color
- hsl :: CFloat -> CFloat -> CFloat -> Color
- hsla :: CFloat -> CFloat -> CFloat -> CUChar -> Color
- rgb'_ :: CUChar -> CUChar -> CUChar -> ColorPtr -> IO ()
- rgbf'_ :: CFloat -> CFloat -> CFloat -> ColorPtr -> IO ()
- rgba'_ :: CUChar -> CUChar -> CUChar -> CUChar -> ColorPtr -> IO ()
- rgbaf'_ :: CFloat -> CFloat -> CFloat -> CFloat -> ColorPtr -> IO ()
- lerpRGBA'_ :: ColorPtr -> ColorPtr -> CFloat -> ColorPtr -> IO ()
- transRGBA'_ :: ColorPtr -> CUChar -> ColorPtr -> IO ()
- transRGBAf'_ :: ColorPtr -> CFloat -> ColorPtr -> IO ()
- hsl'_ :: CFloat -> CFloat -> CFloat -> ColorPtr -> IO ()
- hsla'_ :: CFloat -> CFloat -> CFloat -> CUChar -> ColorPtr -> IO ()
Documentation
rgba
Instances
Eq Color Source # | |
Ord Color Source # | |
Read Color Source # | |
Show Color Source # | |
Storable Color Source # | |
rgb :: CUChar -> CUChar -> CUChar -> Color Source #
Returns a color value from red, green, blue values. Alpha will be set to 255 (1.0f).
rgbf :: CFloat -> CFloat -> CFloat -> Color Source #
Returns a color value from red, green, blue values. Alpha will be set to 1.0f.
rgba :: CUChar -> CUChar -> CUChar -> CUChar -> Color Source #
Returns a color value from red, green, blue and alpha values.
rgbaf :: CFloat -> CFloat -> CFloat -> CFloat -> Color Source #
Returns a color value from red, green, blue and alpha values.
lerpRGBA :: Color -> Color -> CFloat -> Color Source #
Linearly interpolates from color c0 to c1, and returns resulting color value.
hsl :: CFloat -> CFloat -> CFloat -> Color Source #
Returns color value specified by hue, saturation and lightness. HSL values are all in range [0..1], alpha will be set to 255.