skued.rgb_sweep

skued.rgb_sweep(num_colors, source, dest)

Generate a set of RGB colors as a linear sweep between two RGB colors source and dest. These colors can be used by Matplotlib, PyQtGraph, Qt, and other plotting/graphics libraries.

Parameters:
  • num_colors (int) – Number of colors to generate.

  • source (3-tuple of floats or str) – Source color in RGB space. Values should be between 0.0 and 1.0. if source is a string, it is assumed to be in hexadecimal representation.

  • dest (3-tuple of floats or str) – Destination color in RGB space. RGB tuple Values should be between 0.0 and 1.0. If dest is a string, it is assumed to be in hexadecimal representation.

Yields:

color ((R,G,B) tuple.) – R, G, B values in a tuple, from 0.0 to 1.0.