Sha256: 1492279e91c3dad630f7f0195714a978317282ef40e415b167e822f17b15812a

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::Foreground}) of a terminal colour escape sequence.
  #
  # @api private
  class Background < Vedeu::ColourTranslator

    private

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

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

    # @return [Vedeu::Backgrounds]
    def repository
      Vedeu.background_colours
    end

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

  end # Background

end # Vedeu

Version data entries

3 entries across 3 versions & 1 rubygems

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