Module OgamlGraphics.Color.RGB

Manipulation of RGBA colors
type t = {r : float; g : float; b : float; a : float}
Type of a color in RGBA format

Record fields

r : float
g : float
b : float
a : float
val make : ?alpha:float -> float -> float -> float -> t
Fast way to create an RGB color (alpha defaults to 1)
val black : t
Opaque black
val white : t
Opaque white
val red : t
Opaque red
val green : t
Opaque green
val blue : t
Opaque blue
val yellow : t
Opaque yellow
val magenta : t
Opaque magenta
val cyan : t
Opaque cyan
val transparent : t
Transparent black
val clamp : t -> t
Clamps all the values of a color between 0 and 1
val map : t -> (float -> float) -> t
Maps each value of a color
val print : t -> string
Pretty-prints a color to a string