fortplot_matplotlib_color_utils Module

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.



Subroutines

public subroutine resolve_color_string_or_rgb(color_str, color_rgb, context, rgb_out, has_color)

Merge string/RGB color inputs into a single RGB triple.

Read more…

Arguments

Type IntentOptional 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

public subroutine resolve_sequence_to_rgb(color_strings, rgb_array, context, success)

Parse an array of color strings into a 3xN RGB matrix.

Read more…

Arguments

Type IntentOptional 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