Sha256: 11b1ba84148443b0db6ab1d5324b340584e9d98b534be2fd28f625624c48eff9

Contents?: true

Size: 572 Bytes

Versions: 25

Compression:

Stored size: 572 Bytes

Contents

module Vedeu

  # The class represents one half (the other, can be found at
  # {Vedeu::Background}) of a terminal colour escape sequence.
  #
  class Foreground < Vedeu::ColourTranslator

    private

    # @return [String]
    def named_codes
      Vedeu::Esc.foreground_codes[colour]
    end

    # @return [String]
    def numbered_prefix
      "\e[38;5;"
    end

    # @return [Vedeu::Foregrounds]
    def repository
      Vedeu.foreground_colours
    end

    # @return [String]
    def rgb_prefix
      "\e[38;2;%s;%s;%sm"
    end

  end # Foreground

end # Vedeu

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
vedeu-0.6.1 lib/vedeu/colours/foreground.rb
vedeu-0.6.0 lib/vedeu/colours/foreground.rb
vedeu-0.5.13 lib/vedeu/colours/foreground.rb
vedeu-0.5.12 lib/vedeu/colours/foreground.rb
vedeu-0.5.11 lib/vedeu/colours/foreground.rb
vedeu-0.5.10 lib/vedeu/colours/foreground.rb
vedeu-0.5.9 lib/vedeu/colours/foreground.rb
vedeu-0.5.8 lib/vedeu/colours/foreground.rb
vedeu-0.5.7 lib/vedeu/colours/foreground.rb
vedeu-0.5.6 lib/vedeu/colours/foreground.rb
vedeu-0.5.5 lib/vedeu/colours/foreground.rb
vedeu-0.5.4 lib/vedeu/colours/foreground.rb
vedeu-0.5.3 lib/vedeu/colours/foreground.rb
vedeu-0.5.2 lib/vedeu/colours/foreground.rb
vedeu-0.5.1 lib/vedeu/colours/foreground.rb
vedeu-0.5.0 lib/vedeu/colours/foreground.rb
vedeu-0.4.65 lib/vedeu/colours/foreground.rb
vedeu-0.4.64 lib/vedeu/colours/foreground.rb
vedeu-0.4.63 lib/vedeu/colours/foreground.rb
vedeu-0.4.62 lib/vedeu/colours/foreground.rb