INNER CODE UNIT · Ruby

color

busyloop/lolcat · lib/lolcat/lol.rb:84

      color = rainbow(opts[:freq], @os+i/opts[:spread])
      if opts[:invert] then
        print c[0], Paint.color(nil, color), c[1], "\e[49m"
      else
        print c[0], Paint.color(color), c[1], "\e[39m"
      end
    end

    if chomped == nil
      @old_os = @os
      @os = @os + filtered.length/opts[:spread]
    elsif @old_os
      @os = @old_os
      @old_os = nil
    end
  end

  def self.println_ani(str, opts={}, chomped)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…