term-ansicolor 1.10.0 → 1.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/term/ansicolor/attribute/color256.rb +1 -1
- data/lib/term/ansicolor/attribute/color8.rb +16 -16
- data/lib/term/ansicolor/attribute/intense_color8.rb +32 -34
- data/lib/term/ansicolor/attribute/underline.rb +1 -1
- data/lib/term/ansicolor/attribute.rb +6 -6
- data/lib/term/ansicolor/version.rb +1 -1
- data/term-ansicolor.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 768db698164c4d6226839c11932c868d2a6e93e2c6d6db03e5fbee3422b8ecf7
|
4
|
+
data.tar.gz: 025abdbb49d4c589a00e70c7f467612d24748cc7b43db3901ca7b9bde909e906
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea842c5808c77941ba10f1599cda75bd8a32c07317c126298b4000b7340111f83a0dc6c7b79862d8e708860f5b4e0f2ede10e82d7a7e678fb9cf3f7122473266
|
7
|
+
data.tar.gz: 2edff8a89a38ad47f54f9110923ae2a809e9196f8222d9da6ba82513bdd650eff66623baeacfb075cccc03e7b21728c1a3a58a6d759aceb61336f271a6a15add
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.10.
|
1
|
+
1.10.1
|
@@ -4,7 +4,7 @@ module Term
|
|
4
4
|
class Color256
|
5
5
|
Attribute.set :color0, 0, html: '#000000'
|
6
6
|
Attribute.set :color1, 1, html: '#800000'
|
7
|
-
Attribute.set :color2, 2, html: '#
|
7
|
+
Attribute.set :color2, 2, html: '#008000'
|
8
8
|
Attribute.set :color3, 3, html: '#808000'
|
9
9
|
Attribute.set :color4, 4, html: '#000080'
|
10
10
|
Attribute.set :color5, 5, html: '#800080'
|
@@ -2,23 +2,23 @@ module Term
|
|
2
2
|
module ANSIColor
|
3
3
|
class Attribute
|
4
4
|
class Color8
|
5
|
-
Attribute.set :black, 30,
|
6
|
-
Attribute.set :red, 31,
|
7
|
-
Attribute.set :green, 32,
|
8
|
-
Attribute.set :yellow, 33,
|
9
|
-
Attribute.set :blue, 34,
|
10
|
-
Attribute.set :magenta, 35,
|
11
|
-
Attribute.set :cyan, 36,
|
12
|
-
Attribute.set :white, 37,
|
5
|
+
Attribute.set :black, 30, direct: '#000000'
|
6
|
+
Attribute.set :red, 31, direct: '#800000'
|
7
|
+
Attribute.set :green, 32, direct: '#008000'
|
8
|
+
Attribute.set :yellow, 33, direct: '#808000'
|
9
|
+
Attribute.set :blue, 34, direct: '#000080'
|
10
|
+
Attribute.set :magenta, 35, direct: '#800080'
|
11
|
+
Attribute.set :cyan, 36, direct: '#008080'
|
12
|
+
Attribute.set :white, 37, direct: '#c0c0c0'
|
13
13
|
|
14
|
-
Attribute.set :on_black, 40,
|
15
|
-
Attribute.set :on_red, 41,
|
16
|
-
Attribute.set :on_green, 42,
|
17
|
-
Attribute.set :on_yellow, 43,
|
18
|
-
Attribute.set :on_blue, 44,
|
19
|
-
Attribute.set :on_magenta, 45,
|
20
|
-
Attribute.set :on_cyan, 46,
|
21
|
-
Attribute.set :on_white, 47,
|
14
|
+
Attribute.set :on_black, 40, direct: '#000000'
|
15
|
+
Attribute.set :on_red, 41, direct: '#800000'
|
16
|
+
Attribute.set :on_green, 42, direct: '#008000'
|
17
|
+
Attribute.set :on_yellow, 43, direct: '#808000'
|
18
|
+
Attribute.set :on_blue, 44, direct: '#000080'
|
19
|
+
Attribute.set :on_magenta, 45, direct: '#800080'
|
20
|
+
Attribute.set :on_cyan, 46, direct: '#008080'
|
21
|
+
Attribute.set :on_white, 47, direct: '#808080'
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
@@ -2,41 +2,39 @@ module Term
|
|
2
2
|
module ANSIColor
|
3
3
|
class Attribute
|
4
4
|
class IntenseColor8
|
5
|
-
|
6
|
-
Attribute.set :
|
7
|
-
Attribute.set :
|
8
|
-
Attribute.set :
|
9
|
-
Attribute.set :
|
10
|
-
Attribute.set :
|
11
|
-
Attribute.set :
|
12
|
-
Attribute.set :
|
13
|
-
Attribute.set :
|
14
|
-
Attribute.set :
|
15
|
-
Attribute.set :
|
16
|
-
Attribute.set :
|
17
|
-
Attribute.set :
|
18
|
-
Attribute.set :
|
19
|
-
Attribute.set :
|
20
|
-
Attribute.set :
|
21
|
-
Attribute.set :bright_white, 97
|
5
|
+
Attribute.set :intense_black, 90, direct: '#808080'
|
6
|
+
Attribute.set :bright_black, 90, direct: '#808080'
|
7
|
+
Attribute.set :intense_red, 91, direct: '#ff0000'
|
8
|
+
Attribute.set :bright_red, 91, direct: '#ff0000'
|
9
|
+
Attribute.set :intense_green, 92, direct: '#00ff00'
|
10
|
+
Attribute.set :bright_green, 92, direct: '#00ff00'
|
11
|
+
Attribute.set :intense_yellow, 93, direct: '#ffff00'
|
12
|
+
Attribute.set :bright_yellow, 93, direct: '#ffff00'
|
13
|
+
Attribute.set :intense_blue, 94, direct: '#0000ff'
|
14
|
+
Attribute.set :bright_blue, 94, direct: '#0000ff'
|
15
|
+
Attribute.set :intense_magenta, 95, direct: '#ff00ff'
|
16
|
+
Attribute.set :bright_magenta, 95, direct: '#ff00ff'
|
17
|
+
Attribute.set :intense_cyan, 96, direct: '#00ffff'
|
18
|
+
Attribute.set :bright_cyan, 96, direct: '#00ffff'
|
19
|
+
Attribute.set :intense_white, 97, direct: '#ffffff'
|
20
|
+
Attribute.set :bright_white, 97, direct: '#ffffff'
|
22
21
|
|
23
|
-
|
24
|
-
Attribute.set :
|
25
|
-
Attribute.set :
|
26
|
-
Attribute.set :
|
27
|
-
Attribute.set :
|
28
|
-
Attribute.set :
|
29
|
-
Attribute.set :
|
30
|
-
Attribute.set :
|
31
|
-
Attribute.set :
|
32
|
-
Attribute.set :
|
33
|
-
Attribute.set :
|
34
|
-
Attribute.set :
|
35
|
-
Attribute.set :
|
36
|
-
Attribute.set :
|
37
|
-
Attribute.set :
|
38
|
-
Attribute.set :
|
39
|
-
Attribute.set :on_bright_white, 107
|
22
|
+
Attribute.set :on_intense_black, 100, direct: '#808080'
|
23
|
+
Attribute.set :on_bright_black, 100, direct: '#808080'
|
24
|
+
Attribute.set :on_intense_red, 101, direct: '#ff0000'
|
25
|
+
Attribute.set :on_bright_red, 101, direct: '#ff0000'
|
26
|
+
Attribute.set :on_intense_green, 102, direct: '#00ff00'
|
27
|
+
Attribute.set :on_bright_green, 102, direct: '#00ff00'
|
28
|
+
Attribute.set :on_intense_yellow, 103, direct: '#ffff00'
|
29
|
+
Attribute.set :on_bright_yellow, 103, direct: '#ffff00'
|
30
|
+
Attribute.set :on_intense_blue, 104, direct: '#0000ff'
|
31
|
+
Attribute.set :on_bright_blue, 104, direct: '#0000ff'
|
32
|
+
Attribute.set :on_intense_magenta, 105, direct: '#ff00ff'
|
33
|
+
Attribute.set :on_bright_magenta, 105, direct: '#ff00ff'
|
34
|
+
Attribute.set :on_intense_cyan, 106, direct: '#00ffff'
|
35
|
+
Attribute.set :on_bright_cyan, 106, direct: '#00ffff'
|
36
|
+
Attribute.set :on_intense_white, 107, direct: '#ffffff'
|
37
|
+
Attribute.set :on_bright_white, 107, direct: '#ffffff'
|
40
38
|
end
|
41
39
|
end
|
42
40
|
end
|
@@ -17,7 +17,7 @@ module Term
|
|
17
17
|
if color
|
18
18
|
a = Term::ANSIColor::Attribute[color]
|
19
19
|
color_code =
|
20
|
-
if a.true_color? || a.rgb_color? || a.
|
20
|
+
if a.true_color? || a.rgb_color? || a.direct?
|
21
21
|
color_code = "\e[58;2;#{a.rgb.to_a * ?;}"
|
22
22
|
else
|
23
23
|
raise ArgumentError, "invalid color #{a.name.inspect}"
|
@@ -91,8 +91,8 @@ module Term
|
|
91
91
|
if rgb = options[:true_color]
|
92
92
|
@true_color = true
|
93
93
|
@rgb = rgb
|
94
|
-
elsif rgb = options[:
|
95
|
-
@
|
94
|
+
elsif rgb = options[:direct]
|
95
|
+
@direct = true
|
96
96
|
@rgb = RGBTriple.from_html(rgb)
|
97
97
|
elsif html = options[:html]
|
98
98
|
@rgb = RGBTriple.from_html(html)
|
@@ -110,7 +110,7 @@ module Term
|
|
110
110
|
background? ? "48;2;#{@rgb.to_a * ?;}" : "38;2;#{@rgb.to_a * ?;}"
|
111
111
|
elsif rgb_color?
|
112
112
|
background? ? "48;5;#{@code}" : "38;5;#{@code}"
|
113
|
-
elsif
|
113
|
+
elsif direct?
|
114
114
|
background? ? (@code.to_i + 10).to_s : @code
|
115
115
|
else
|
116
116
|
@code
|
@@ -125,8 +125,8 @@ module Term
|
|
125
125
|
!!@background
|
126
126
|
end
|
127
127
|
|
128
|
-
def
|
129
|
-
!!@
|
128
|
+
def direct?
|
129
|
+
!!@direct
|
130
130
|
end
|
131
131
|
|
132
132
|
attr_writer :background
|
@@ -134,7 +134,7 @@ module Term
|
|
134
134
|
attr_reader :rgb
|
135
135
|
|
136
136
|
def rgb_color?
|
137
|
-
!!@rgb && !@true_color && !@
|
137
|
+
!!@rgb && !@true_color && !@direct
|
138
138
|
end
|
139
139
|
|
140
140
|
def true_color?
|
data/term-ansicolor.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: term-ansicolor 1.10.
|
2
|
+
# stub: term-ansicolor 1.10.1 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "term-ansicolor".freeze
|
6
|
-
s.version = "1.10.
|
6
|
+
s.version = "1.10.1".freeze
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib".freeze]
|