Sha256: 5863d19b28a61a2165d8750cbb038111f19c5a762af96fdbf8294a8f7fef7379

Contents?: true

Size: 589 Bytes

Versions: 3

Compression:

Stored size: 589 Bytes

Contents

module Vedeu

  # The class represents one half (the other, can be found at
  # {Vedeu::Background}) of a terminal colour escape sequence.
  #
  # @api private
  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

3 entries across 3 versions & 1 rubygems

Version Path
vedeu-0.4.56 lib/vedeu/colours/foreground.rb
vedeu-0.4.55 lib/vedeu/colours/foreground.rb
vedeu-0.4.54 lib/vedeu/output/foreground.rb