code: def ColorWithLightness(self, lightness):
      '''Create a new instance based on this one with a new lightness value.
  
      Parameters:
        :lightness:
          The lightness of the new color [0...1].
  
      Returns:
        A grapefruit.Color instance.
  
      >>> Color.NewFromHsl(30, 1, 0.5).ColorWithLightness(0.25)
      (0.5, 0.25, 0.0, 1.0)
      >>> Color.NewFromHsl(30, 1, 0.5).ColorWithLightness(0.25).hsl
      (30, 1, 0.25)
  
      '''
      h, s, l = self.__hsl
      return Color((h, s, lightness), 'hsl', self.__a, self.__wreff ColorWithLightness(self, lightness):
      '''Create a new instance based on this one with a new lightness value.
  
      Parameters:
        :lightness:
          The lightness of the new color [0...1].
  
      Returns:
        A grapefruit.Color instance.
  
      >>> Color.NewFromHsl(30, 1, 0.5).ColorWithLightness(0.25)
      (0.5, 0.25, 0.0, 1.0)
      >>> Color.NewFromHsl(30, 1, 0.5).ColorWithLightness(0.25).hsl
      (30, 1, 0.25)
  
      '''
      h, s, l = self.__hsl
      return Color((h, s, lightness), 'hsl', self.__a, self.__wref)
docs: Create a new instance based on this one with a new lightness value.
  
      Parameters:
        :lightness:
          The lightness of the new color [0...1].
  
      Returns:
        A grapefruit.Color instance.
  
      >>> Color.NewFromHsl(30, 1, 0.5).ColorWithLightness(0.25)
      (0.5, 0.25, 0.0, 1.0)
      >>> Color.NewFromHsl(30, 1, 0.5).ColorWithLightness(0.25).hsl
      (30, 1, 0.25)