Legend:
Library
Module
Module type
Parameter
Class
Class type
Definition of colormaps, i.e. mappings from real RGB colors to integers. The integer corresponding to a color c is an index i into a vector of colors whose ith element is c.
exceptionToo_many_colors
An exception raised when too many number of colors are used for a given color model.
Add a new color into the given colormap and return its index. If the color is already in the colormap, it is not added again, and the corresponding color index is returned.
Add the list of new colors into the given colormap and return their indices. If a color is already in the colormap, it is not added again, and the corresponding color index is returned.
It queries the name in the color name database given by the file Camlimages.path_rgb_txt. It also understands the following color format:
"#rrggbb" where r,g and b are 0-9a-fA-F "#rrrrggggbbbb" where r,g and b are 0-9a-fA-F
It may raise Failure if not found.
val colormap_parse : string array->rgb array * int
Same as color_parse but work for multiple names.
If a color of the result has a minus value for its R component, it is considered transparent and replaced by r=0 g=255 b=0. The function returns the last transparent color index.