[]= (GD2::Palette)

    # File lib/gd2/palette.rb, line 86
        def []=(index, color)
          raise RangeError unless (0...MAX_COLORS).include? index
          if color.nil?
            deallocate(self[index] ||
              Color.new_from_palette(0, 0, 0, 0, index, self))
          else
            ptr = @image.image_ptr
            ptr["red[#{index}]""red[#{index}]"] = color.red
            ptr["green[#{index}]""green[#{index}]"] = color.green
            ptr["blue[#{index}]""blue[#{index}]"] = color.blue
            ptr["alpha[#{index}]""alpha[#{index}]"] = color.alpha
            ptr["open[#{index}]""open[#{index}]"] = 0
          end
        end