alphapepttools.pl.show_rgba_color_list#
- alphapepttools.pl.show_rgba_color_list(colors)#
Display a horizontal bar of RGBA colors for visual inspection
Creates a matplotlib figure showing the provided colors as a horizontal bar, useful for quickly visualizing color palettes or verifying color schemes. The figure width is automatically adjusted based on the number of colors (up to a maximum of 10 units).
- Parameters:
colors (list) – List of RGBA color tuples, where each tuple contains (red, green, blue, alpha) values in the range [0, 1].
- Return type:
- Returns:
None
Examples
Visualize a custom color palette:
colors = [(1.0, 0.0, 0.0, 1.0), (0.0, 1.0, 0.0, 1.0), (0.0, 0.0, 1.0, 1.0)] show_rgba_color_list(colors)
Inspect colors from a colormap:
from alphapepttools.pl.colors import BaseColormaps cmap_colors = BaseColormaps.get("sequential", n=5) show_rgba_color_list(cmap_colors)