code: def _rgb2l(self, mode):
          
          self._check_modes(("RGB", "RGBA"))
  
          kb_ = 0.114
          kr_ = 0.299
  
          r__ = self.channels[0]
          g__ = self.channels[1]
          b__ = self.channels[2]
  
          y__ = kr_ * r__ + (1 - kr_ - kb_) * g__ + kb_ * b__
  
          if self.fill_value is not None:
              self.fill_value = ([rgb2ycbcr(self.fill_value[0],
                                            self.fill_value[1],
                                            self.fill_value[2])[0]] +
                                 self.fill_value[3:])
  
          self.channels = [y__] + self.channels[3:]
  
          self.mode = mode
docs: Convert from RGB to monochrome L.