multicolorfits.combo_swatch#

multicolorfits.combo_swatch(colors, mode='rgb', blend='screen', gamma=2.2, background='black', inverse=False, size=320, labels=None)[source]#

Render the composite-mode-aware color-combination swatch.

Parameters:
  • colors (list of str) – Channel colors (hex strings), one per circle.

  • mode (see combine_colorized_layers.)

  • blend (see combine_colorized_layers.)

  • gamma (see combine_colorized_layers.)

  • background (see combine_colorized_layers.)

  • inverse (see combine_colorized_layers.)

  • size (int) – Pixel size of the (square) swatch image.

  • labels (list of str or None) – Optional per-circle labels (stored in the returned geometry).

Returns:

dict or None{'rgba': (size,size,4) float array in [0,1], 'circles': [...], 'size': size} where each circle is {'x','y','r','color','label'} in swatch pixel coords (origin lower-left). None if colors is empty.