Sha256: 9f2bdba5e013e44e08deab2153b9b396c21bb2d1301e0bc6427f95c62938bb27

Contents?: true

Size: 734 Bytes

Versions: 17

Compression:

Stored size: 734 Bytes

Contents

module Vedeu

  module Colours

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

      private

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

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

      # @return [Vedeu::Colours::Foregrounds]
      def repository
        Vedeu.foreground_colours
      end

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

    end # Foreground

  end # Colours

end # Vedeu

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
vedeu-0.6.68 lib/vedeu/colours/foreground.rb
vedeu-0.6.67 lib/vedeu/colours/foreground.rb
vedeu-0.6.66 lib/vedeu/colours/foreground.rb
vedeu-0.6.65 lib/vedeu/colours/foreground.rb
vedeu-0.6.64 lib/vedeu/colours/foreground.rb
vedeu-0.6.63 lib/vedeu/colours/foreground.rb
vedeu-0.6.62 lib/vedeu/colours/foreground.rb
vedeu-0.6.61 lib/vedeu/colours/foreground.rb
vedeu-0.6.60 lib/vedeu/colours/foreground.rb
vedeu-0.6.59 lib/vedeu/colours/foreground.rb
vedeu-0.6.58 lib/vedeu/colours/foreground.rb
vedeu-0.6.57 lib/vedeu/colours/foreground.rb
vedeu-0.6.56 lib/vedeu/colours/foreground.rb
vedeu-0.6.54 lib/vedeu/colours/foreground.rb
vedeu-0.6.53 lib/vedeu/colours/foreground.rb
vedeu-0.6.52 lib/vedeu/colours/foreground.rb
vedeu-0.6.51 lib/vedeu/colours/foreground.rb