resolveColor#
Fully qualified name: isaacsim::common::string::resolveColor
- std::vector<float> isaacsim::common::string::resolveColor(
- const std::string &color,
Resolve a matplotlib-style color specification to a vector of 3 normalized RGB float components.
Supported inputs (mirroring matplotlib’s
to_rgb):#rgb/#rrggbbshort and full hex (case-insensitive;#rgba/#rrggbbaaaccepted, alpha discarded)grayscale strings such as
"0.5"(a float in the 0-1 range)single-letter base colors such as
"k"X11/CSS4 named colors such as
"AquaMarine"(case-insensitive)Tableau colors such as
"tab:Green"(case-insensitive)the
CNcycle specification such as"C2""none"(case-insensitive), the fully transparent color, resolved to black{0, 0, 0}
- Parameters:
color – [in] The color specification to resolve.
- Throws:
std::invalid_argument – if
coloris not a supported/recognized specification.- Returns:
RGB components, each in the 0-1 range (e.g.
{0.2f, 0.5f, 1.0f}).