fortplot_color_conversions Module

Color space conversions and colormap functionality

Provides: - RGB to HSV/LAB color space conversions - Colormap application to data arrays - Built-in colormaps: viridis, plasma, coolwarm - Efficient array-based colormap operations



Subroutines

public subroutine rgb_to_hsv(rgb, hsv)

Convert RGB to HSV color space

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: rgb(3)
real(kind=wp), intent(out) :: hsv(3)

public subroutine rgb_to_lab(rgb, lab)

Convert RGB to LAB color space (simplified implementation)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: rgb(3)
real(kind=wp), intent(out) :: lab(3)

public subroutine apply_colormap_to_array(values, colormap, rgb_mapped)

Apply colormap to array of values efficiently

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: values(:)
character(len=*), intent(in) :: colormap
real(kind=wp), intent(out) :: rgb_mapped(:,:)