def merge_constants!(constants_hash)
      constants_hash.each_pair do |name, value|
        @constants[name] = case value
        when Array
          case value.size
          when 3 then Gosu::Color.rgb(*value)
          when 4 then Gosu::Color.rgba(*value)
          else
            raise "Colors must be in 0..255, RGB or RGBA array format"
          end
        else
          value
        end
      end

      self
    end
def merge_constants!(constants_hash)
      constants_hash.each_pair do |name, value|
        @constants[name] = case value
        when Array
          case value.size
          when 3 then Gosu::Color.rgb(*value)
          when 4 then Gosu::Color.rgba(*value)
          else
            raise "Colors must be in 0..255, RGB or RGBA array format"
          end
        else
          value
        end
      end

      self
    end
Merge in a hash containing constant values. Arrays will be resolved as colors in RGBA or RGB format.

 @param [Hash<Symbol => Object>] constants_hash