Gimp.RGB.prototype.luminance

function luminance(): Number(gdouble) {
    // Gjs wrapper for gimp_rgb_luminance()
}
  

Since 2.4

Returns

the luminous intensity of the range from 0.0 to 1.0.