- "$model = $color->model;"
- Return the name of the color model.
- "@components = $color->components;"
- Return the components of the color.
- "$other = $color->convert($tomodel);"
- Converts the color to another color model.
- "$string = $color->toString;"
- Returns a printed representation of the color.
- "$hex = $color->toHex;"
- Returns a string representing the color as RGB in hexadecimal (6
digits).
- "$other = $color->toCore();"
- Converts the color to one of the core colors.
- "$complement = $color->complement();"
- Returns the complement color (works for colors in
"rgb",
"cmy" and
"gray" color models).
- "$new = $color->mix($other,$fraction);"
- Returns a new color which results from mixing a
$fraction of $color with
"(1-$fraction)" of color
$other.
- "$new = $color->add($other);"
- Returns a new color made by adding the components of the two colors.
- "$new = $color->scale($m);"
- Returns a new color made by mulitiplying the components by
$n.
- "$new = $color->multiply(@m);"
- Returns a new color made by mulitiplying the components by the
corresponding component from @n.
Supported color models: LaTeXML::Common::Color::rgb,
LaTeXML::Common::Color::hsb, LaTeXML::Common::Color::cmy,
LaTeXML::Common::Color::cmyk, LaTeXML::Common::Color::gray and
LaTeXML::Common::Color::Derived.
Bruce Miller <bruce.miller@nist.gov>
Public domain software, produced as part of work done by the
United States Government & not subject to copyright in the US.