*/OSL*
This node transforms an RGB input into a single float value using multiple modes:
Input color to convert as float.
Color space conversion curve to be used when the Luminance mode is selected.

1: Source image to convert as a mask to avoid the UV border cut

2: Color to Float result to be used as a mask

3: Source image combined with a white background using the Color to Float result as a mask