Sha256: d29daddeadd2abb77cd1aecbfb98312695dddc66f8185a1ec0f119da26ce41ca

Contents?: true

Size: 568 Bytes

Versions: 13

Compression:

Stored size: 568 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::Translator

    private

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

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

    # @return [Vedeu::ForegroundColours]
    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

13 entries across 13 versions & 1 rubygems

Version Path
vedeu-0.4.32 lib/vedeu/output/foreground.rb
vedeu-0.4.31 lib/vedeu/output/foreground.rb
vedeu-0.4.30 lib/vedeu/output/foreground.rb
vedeu-0.4.29 lib/vedeu/output/foreground.rb
vedeu-0.4.28 lib/vedeu/output/foreground.rb
vedeu-0.4.27 lib/vedeu/output/foreground.rb
vedeu-0.4.26 lib/vedeu/output/foreground.rb
vedeu-0.4.25 lib/vedeu/output/foreground.rb
vedeu-0.4.24 lib/vedeu/output/foreground.rb
vedeu-0.4.23 lib/vedeu/output/foreground.rb
vedeu-0.4.22 lib/vedeu/output/foreground.rb
vedeu-0.4.21 lib/vedeu/output/foreground.rb
vedeu-0.4.20 lib/vedeu/output/foreground.rb