Sha256: db5cbf1b09409f3c6c7a8bdbeb08306db62724c85f2c6b58cbcc648a8ce9f502

Contents?: true

Size: 678 Bytes

Versions: 2

Compression:

Stored size: 678 Bytes

Contents

module Vedeu

  module Colours

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

      private

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

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

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

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

    end # Background

  end # Colours

end # Vedeu

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vedeu-0.6.10 lib/vedeu/colours/background.rb
vedeu-0.6.9 lib/vedeu/colours/background.rb