Shared helpers for resolving matplotlib-style color kwargs.
The matplotlib facade accepts color arguments that may be either a character string (named color, hex, single letter) or a real RGB triple. This module centralises the resolution and validation logic so each wrapper keeps a single, declarative call site.
Merge string/RGB color inputs into a single RGB triple.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in), | optional | :: | color_str | ||
| real(kind=wp), | intent(in), | optional | :: | color_rgb(3) | ||
| character(len=*), | intent(in) | :: | context | |||
| real(kind=wp), | intent(out) | :: | rgb_out(3) | |||
| logical, | intent(out) | :: | has_color |
Parse an array of color strings into a 3xN RGB matrix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | color_strings(:) | |||
| real(kind=wp), | intent(out), | allocatable | :: | rgb_array(:,:) | ||
| character(len=*), | intent(in) | :: | context | |||
| logical, | intent(out) | :: | success |