multicolorfits.greyscale_image#

multicolorfits.greyscale_image(rgb, method='lab')[source]#

Convert a finished RGB composite to greyscale, e.g. to check how it will look in a B&W print.

Parameters:
  • rgb (array) – RGB image (…,3) with values in [0,1]

  • method (str) – ‘lab’ (default) uses the CIELAB L* channel (perceptual lightness); ‘luma’ uses the Rec.709 luma weights (0.2126R + 0.7152G + 0.0722B).

Returns:

array – Greyscale image with the same (…,3) shape (all channels equal).