code: def RgbToGreyscale(r, g, b):
      '''Convert the color from RGB to its greyscale equivalent
  
      Parameters:
        :r:
          The Red component value [0...1]
        :g:
          The Green component value [0...1]
        :b:
          The Blue component value [0...1]
  
      Returns:
        The color as an (r, g, b) tuple in the range:
        the range:
        r[0...1],
        g[0...1],
        b[0...1]
  
      >>> '(%g, %g, %g)' % Color.RgbToGreyscale(1, 0.8, 0)
      '(0.6, 0.6, 0.6)'
  
      '''
      v = (r + g + b) / 3.0
      return (v, v, vf RgbToGreyscale(r, g, b):
      '''Convert the color from RGB to its greyscale equivalent
  
      Parameters:
        :r:
          The Red component value [0...1]
        :g:
          The Green component value [0...1]
        :b:
          The Blue component value [0...1]
  
      Returns:
        The color as an (r, g, b) tuple in the range:
        the range:
        r[0...1],
        g[0...1],
        b[0...1]
  
      >>> '(%g, %g, %g)' % Color.RgbToGreyscale(1, 0.8, 0)
      '(0.6, 0.6, 0.6)'
  
      '''
      v = (r + g + b) / 3.0
      return (v, v, v)
docs: Convert the color from RGB to its greyscale equivalent
  
      Parameters:
        :r:
          The Red component value [0...1]
        :g:
          The Green component value [0...1]
        :b:
          The Blue component value [0...1]
  
      Returns:
        The color as an (r, g, b) tuple in the range:
        the range:
        r[0...1],
        g[0...1],
        b[0...1]
  
      >>> '(%g, %g, %g)' % Color.RgbToGreyscale(1, 0.8, 0)
      '(0.6, 0.6, 0.6)'