Sha256: 92364a2eade13fd7a26902ef32d9f94a3b14c6f0ba2565d04b5c60616585e261

Contents?: true

Size: 458 Bytes

Versions: 3

Compression:

Stored size: 458 Bytes

Contents

module Vedeu

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

    private

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

    # @return [String]
    def numbered_prefix
      "\e[48;5;"
    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.5 lib/vedeu/output/background.rb
vedeu-0.4.4 lib/vedeu/output/background.rb
vedeu-0.4.3 lib/vedeu/output/background.rb