module Color:sig..end
Definitions of many colors
Colors
type t
the abstract type of colors
val default : tthe default color is black
val rgb : float -> float -> float -> trgb r g b constructs the color that corresponds to the color code
RGB(r,g,b)
val rgb8 : int -> int -> int -> tsimilar to rgb, but takes integers between 0 and 255 as argument
val cmyk : float -> float -> float -> float -> tcmyk c m y k constructs the color that corresponds to the color code
CMYK(c,m,y,k)
WARNING : If you use transparency with .mps file in your latex document you need to add : \LoadMetaPostSpecialExtensions in the preamble
val rgba : float -> float -> float -> float -> tsimilar to rgb, but takes the factor of transparency
val rgba : float -> float -> float -> float -> tsimilar to rgb, but takes the factor of transparency
val rgb8a : int -> int -> int -> int -> tsimilar to rgb8, but takes the factor of transparency
val cmyka : float -> float -> float -> float -> float -> tsimilar to cmyk, but takes the factor of transparency
val is_opaque : t -> booltest if the color is opaque
val opaque : t -> tmake a color opaque
val transparent : float -> t -> ttransparent f c multiplies by f the factor of transparency of c
val hsv : float -> float -> float -> thsv h s v convert an hsv color to an rgb. 0 <= h < 360, 0 <= s,v <= 1
val color_gen : float -> float -> unit -> tval white : t
val black : t
val red : t
val blue : t
val green : t
val cyan : t
val yellow : t
val magenta : tval lightred : t
val lightblue : t
val lightgreen : t
val lightcyan : t
val lightyellow : t
val lightmagenta : tval gray : float -> t
val lightgray : t
val mediumgray : t
val darkgray : tval orange : t
val purple : tval color : string -> tcolor n returns the RGB color associated to name n
(as defined in /etc/X11/rgb.txt). Raises Not_found if n does not
correspond to a color.
See this list for an
overview.