# File lib/gd2/color.rb, line 114
    def to_s
      s  = 'RGB'
      s += "A" if alpha != ALPHA_OPAQUE
      s += "[#{@index}]" if @index
      s += '#' + [red, green, blue].map { |e| '%02X' % e }.join('')
      s += '%02X' % alpha if alpha != ALPHA_OPAQUE
      s
    end