simplecolor 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7bfa2f004182adc7590fe70ab6a17c4234dbdfe9
4
- data.tar.gz: 2a0ae6533b7ccf85397d9dd0cf4722403eb8c4d9
2
+ SHA256:
3
+ metadata.gz: cfab268c3eafcbb1131d267e320e39be80c8483d5b1fc06a15ed9a283f79e68c
4
+ data.tar.gz: e8d27783b06edb55c59d9c28b1e39f364440a378c3c0d8d65772425d576d2a8a
5
5
  SHA512:
6
- metadata.gz: 7d1fc1b1e74ef5eeea41bab02e75399a551a709230752e6d5816a8b9e518933033040ec58a034afa14fb20c014c2948653d1ca3302512bba68b51d53a9777458
7
- data.tar.gz: 9252b19aa9917848bcef1291a1f35c5af8cc80a816e27691eae258816fe85b208a7657ef977940c1c412c9d06e2578cfa194d413c82d1573ae0ae2648ac9fb9b
6
+ metadata.gz: 35b6df14b721027c4e611b679f3b4499ff0058027e091a641e58e1bcfda7538c90b69ea538c506ba59d84c4c46c5098c93e5253877308aaf02a677cef63a3778
7
+ data.tar.gz: dec9afeeedced20abd1f6d76b7b948925d31ff877130e99059871dfe46ab5b725428ab9515e93738256c3d5d57f7f1f579ec1a6703615cccf216312ccbd4e38c
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright © 2013–2016 Damien Robert
1
+ Copyright © 2013–2017 Damien Robert
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -14,8 +14,7 @@
14
14
  [paint]: https://github.com/janlelis/paint
15
15
 
16
16
  A simple library for coloring text output. Heavily inspired by [rainbow],
17
- [term-ansicolor] and [paint]. I recommend using these gems for more complex
18
- coloring needs.
17
+ [term-ansicolor] and [paint].
19
18
 
20
19
  By default this gem does not change the `String` class, unlike [rainbow]. The
21
20
  reason I wrote this gem is that when mixed in `String` it only adds two
@@ -75,15 +74,20 @@ None.
75
74
  $ gem install simplecolor
76
75
  ~~~
77
76
 
78
- This installs `v0.1.0`, the current `master` version may not work.
77
+ This installs `v0.3.0`, the current `master` version may not work.
79
78
 
80
- ## Todo
79
+ When installing from git, you can regenerate the list of color names by
80
+ running `data/rgb_colors.rb`.
81
81
 
82
- - Support 256 colors
83
- - Tests
82
+ ## TODO
83
+
84
+ - Autodetect color capabilities (using COLORTERM)
85
+ - Use terminfo settings when possible
86
+ - Better color conversion (RGB is non linear)
87
+ - Utilities to darken/lighten colors
84
88
 
85
89
  ## Copyright
86
90
 
87
- Copyright © 2013–2016 Damien Robert
91
+ Copyright © 2013–2019 Damien Robert
88
92
 
89
93
  MIT License. See [LICENSE.txt](./LICENSE.txt) for details.
data/Rakefile CHANGED
@@ -1,15 +1,5 @@
1
1
  require 'rake'
2
2
 
3
- begin
4
- require 'rubygems/tasks'
5
- Gem::Tasks.new(sign: {checksum: true, pgp: true},
6
- scm: {status: true}) do |tasks|
7
- tasks.console.command = 'pry'
8
- end
9
- rescue LoadError => e
10
- warn e.message
11
- end
12
-
13
3
  require 'rake/testtask'
14
4
  Rake::TestTask.new do |test|
15
5
  test.libs << 'test'
@@ -27,3 +17,10 @@ rescue LoadError => e
27
17
  end
28
18
  task :doc => :yard
29
19
 
20
+ begin
21
+ require 'dr/rake_gems'
22
+ Gem::MyTasks.new
23
+ rescue LoadError => e
24
+ warn e.message
25
+ end
26
+
@@ -0,0 +1,218 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'simplecolor/mixin'
4
+ require 'optparse'
5
+
6
+ def showcase
7
+ empty=" "
8
+ lorem="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
9
+
10
+ puts "* 16 colors:"
11
+ print "8 colors: "
12
+ %w(black red green yellow blue magenta cyan white).each do |s|
13
+ print SimpleColor.color(s, s.to_sym); print " "
14
+ end
15
+ puts
16
+
17
+ print "8 colors bold: "
18
+ %w(black red green yellow blue magenta cyan white).each do |s|
19
+ print SimpleColor.color(s, s.to_sym, :bold); print " "
20
+ end
21
+ puts
22
+
23
+ print "8 intense colors: "
24
+ %w(black red green yellow blue magenta cyan white).each do |s|
25
+ print SimpleColor.color(s, "intense_#{s}".to_sym); print " "
26
+ end
27
+ puts
28
+
29
+ print "8 intense colors bold: "
30
+ %w(black red green yellow blue magenta cyan white).each do |s|
31
+ print SimpleColor.color(s, "intense_#{s}".to_sym, :bold); print " "
32
+ end
33
+ puts
34
+ puts
35
+
36
+ print "8 colors on black: "
37
+ %w(black red green yellow blue magenta cyan white).each do |s|
38
+ print SimpleColor.color(s, s.to_sym, :on_black); print " "
39
+ end
40
+ puts
41
+ print "8 colors on white: "
42
+ %w(black red green yellow blue magenta cyan white).each do |s|
43
+ print SimpleColor.color(s, s.to_sym, :on_white); print " "
44
+ end
45
+ puts
46
+ puts
47
+
48
+ puts "System palette:"
49
+ (40..47).each do |color|
50
+ print SimpleColor.color(empty, color)
51
+ end
52
+ print " = "
53
+ %w(black red green yellow blue magenta cyan white).each do |s|
54
+ print SimpleColor.color(empty, "on_#{s}".to_sym);
55
+ end
56
+ # puts (:bold does not change the background color)
57
+ # (40..47).each do |color|
58
+ # print SimpleColor.color(empty, color, :bold)
59
+ # end
60
+ puts #not supported on vte
61
+ (90..97).each do |color|
62
+ print SimpleColor.color(empty, color)
63
+ end
64
+ puts
65
+ puts
66
+
67
+ print SimpleColor[:red, :on_blue]
68
+ print "Red on blue "
69
+ print SimpleColor[:default]
70
+ print "back to default foreground "
71
+ print SimpleColor[:on_default]
72
+ print "back to default background."
73
+ puts
74
+ puts
75
+
76
+ puts "* 256 colors:"
77
+ puts "System palette:";
78
+ (0..7).each do |color|
79
+ print SimpleColor.color(empty, "on_rgb256:#{color}")
80
+ end
81
+ puts
82
+ (8..15).each do |color|
83
+ print SimpleColor.color(empty, "on_rgb256:#{color}")
84
+ end
85
+ puts
86
+
87
+ rgb_cube = ->(&b) do
88
+ for green in 0..5 do
89
+ for red in 0..5 do
90
+ for blue in 0..5 do
91
+ b.call [red, green, blue]
92
+ end
93
+ print " "
94
+ end
95
+ puts
96
+ end
97
+ end
98
+ puts
99
+ puts "Color cube, 6x6x6:"
100
+ rgb_cube.call do |red, green, blue|
101
+ print SimpleColor.color(empty, "on_rgb256:#{red}:#{green}:#{blue}")
102
+ end
103
+ puts
104
+ puts "Grayscale ramp:"
105
+ (0..23).each do |color|
106
+ print SimpleColor.color(empty, "on_rgb256:grey#{color}")
107
+ end
108
+ puts
109
+ puts
110
+ puts "Color cube code:"
111
+ rgb_cube.call do |red, green, blue|
112
+ print SimpleColor.color("#{red}#{green}#{blue}", "rgb256:#{red}:#{green}:#{blue}"); print(" ")
113
+ end
114
+ puts
115
+ puts "Color cube code (bold):"
116
+ rgb_cube.call do |red, green, blue|
117
+ print SimpleColor.color("#{red}#{green}#{blue}", "rgb256:#{red}:#{green}:#{blue}", :bold); print(" ")
118
+ end
119
+
120
+ puts
121
+ puts "* Truecolor:"
122
+ puts SimpleColor.color(SimpleColor.fill("Lemon Chiffon on Lavender"), "Lemon Chiffon", "on_Lavender")
123
+ puts
124
+
125
+ puts "- Random color:"
126
+ lorem.each_char {|c| print SimpleColor.color(:random)+c}
127
+ print SimpleColor.clear
128
+ puts
129
+ puts "- Random color on random background:"
130
+ lorem.each_char {|c| print SimpleColor.color(:random, :on_random)+c}
131
+ print SimpleColor.clear
132
+ puts
133
+
134
+ puts
135
+ print "Solarized on light background: ".color("solarized_base00", "on_solarized_base3")
136
+ %w(yellow orange red magenta violet blue cyan green).each do |col|
137
+ print "#{col} ".color("solarized_#{col}", "on_solarized_base3")
138
+ end
139
+ puts
140
+ print "Solarized on dark background: ".color("solarized_base0", "on_solarized_base03")
141
+ %w(yellow orange red magenta violet blue cyan green).each do |col|
142
+ print "#{col} ".color("solarized_#{col}", "on_solarized_base03")
143
+ end
144
+ puts
145
+ [3, 2, 1, 0].each do |on|
146
+ (0..3).each do |cin|
147
+ puts SimpleColor.fill("Solarized color base0#{cin} on base#{on}").color("solarized_base0#{cin}", "on_solarized_base#{on}")
148
+ end
149
+ end
150
+ [3, 2, 1, 0].each do |on|
151
+ (0..3).each do |cin|
152
+ puts SimpleColor.fill("Solarized color base#{cin} on base0#{on}").color("solarized_base#{cin}", "on_solarized_base0#{on}")
153
+ end
154
+ end
155
+
156
+ puts
157
+ cube= ->(start, to_end) do
158
+ direction=(0..2).map {|i| to_end[i]-start[i]}
159
+ (0..255).each do |v|
160
+ rgb=(0..2).map {|i| start[i]*255 + v*direction[i]}
161
+ print SimpleColor.color(empty, SimpleColor::RGB.new(rgb, background: true))
162
+ end
163
+ end
164
+ print_cube = ->(*steps) do
165
+ print "Cube #{steps.map {|s| s.join}.join(" to ")}: "
166
+ (0...steps.length-1).each do |i|
167
+ cube[steps[i], steps[i+1]]
168
+ print " "
169
+ end
170
+ puts
171
+ end
172
+ print_cube[[0,0,0],[1,1,1]]
173
+
174
+ print_cube[[0,0,0],[1,0,0],[1,1,1]]
175
+ print_cube[[0,0,0],[0,1,0],[1,1,1]]
176
+ print_cube[[0,0,0],[0,0,1],[1,1,1]]
177
+
178
+ print_cube[[0,0,0],[0,1,1],[1,1,1]]
179
+ print_cube[[0,0,0],[1,0,1],[1,1,1]]
180
+ print_cube[[0,0,0],[1,1,0],[1,1,1]]
181
+
182
+ print_cube[[1,0,0],[1,1,0], [0,1,0]]
183
+
184
+ print_cube[[1,0,0],[1,0,1], [0,0,1]]
185
+
186
+ print_cube[[0,1,0],[0,1,1], [0,0,1]]
187
+
188
+ puts "* Effects"
189
+ effects=SimpleColor::Colorer::ANSI_EFFECTS
190
+ effects.values.uniq.each do |v|
191
+ eff=effects.each_key.map { |k| effects[k]==v ? k : nil }.compact
192
+ before_effect=eff.find {|e| e=~/_off/}&.to_s&.sub('_off','')&.to_sym
193
+ if before_effect
194
+ puts "- #{eff.join('/')}: " + "lorem".color(before_effect)+ " ipsum".color(v)
195
+ else
196
+ puts "- #{eff.join('/')}: " + "lorem ipsum".color(v)
197
+ end
198
+ end
199
+ end
200
+
201
+ optparse = OptionParser.new do |opt|
202
+ opt.on("--color=number", "-c", "Set number of colors", Integer) do |v|
203
+ SimpleColor.color_mode=v
204
+ end
205
+ opt.on("--showcase", "Showcase color capabilities of terminal") do |_v|
206
+ showcase
207
+ end
208
+ end
209
+ optparse.parse!
210
+
211
+ args=ARGV.map do |arg|
212
+ if arg.start_with?(':')
213
+ arg[1..-1].to_sym
214
+ else
215
+ arg
216
+ end
217
+ end
218
+ puts SimpleColor.color(*args)
@@ -0,0 +1 @@
1
+ {"deepgreen":"#00543D","verydarkbluishgreen":"#002A29","verydarkgreenishblue":"#002E3B","darkgreenishblue":"#004958","darkbluishgreen":"#004B49","deepbluishgreen":"#00443F","darkgreen":"#1B4D3E","darkolivegreen":"#2B3D26","verydarkyellowishgreen":"#173620","verydeepyellowishgreen":"#003118","verydarkgreen":"#1C352D","darkgrayisholive":"#363527","darkgrayisholivegreen":"#31362B","darkgrayishbrown":"#3E322C","oliveblack":"#25241D","brownishblack":"#28201C","darkolivebrown":"#3B3121","darkolive":"#403D21","darkgrayishyellowishbrown":"#483C32","darkgrayishgreen":"#3A4B47","darkgrayishblue":"#36454F","blackishgreen":"#1A2421","greenishblack":"#1E2321","bluishblack":"#202428","blackishblue":"#202830","black":"#222222","purplishblack":"#242124","reddishblack":"#282022","darkblue":"#00304E","deepblue":"#00416A","grayishpurplishblue":"#4C516D","strongblue":"#0067A5","stronggreenishblue":"#007791","moderategreenishblue":"#367588","deepgreenishblue":"#2E8495","vividgreenishblue":"#0085A1","moderateblue":"#436B95","grayishgreen":"#5E716A","grayishblue":"#536878","darkbluishgray":"#51585E","darkgray":"#555555","darkpurplishgray":"#5D555B","darkgreenishgray":"#4E5755","brownishgray":"#5B504F","darkreddishgray":"#5C504F","olivegray":"#57554C","grayishbrown":"#635147","grayisholivegreen":"#515744","grayisholive":"#5B5842","grayishyellowishbrown":"#7E6D5A","darkyellowishgreen":"#355E3B","moderatebluishgreen":"#317873","vividbluishgreen":"#008882","strongbluishgreen":"#007A74","moderategreen":"#3B7861","stronggreen":"#007959","vividblue":"#00A1C2","brilliantgreenishblue":"#239EBA","brilliantblue":"#4997D0","lightblue":"#70A3CC","lightgreenishblue":"#66AABC","verylightblue":"#A1CAF1","verylightpurplishblue":"#B3BCE2","verylightbluishgreen":"#96DED1","verylightgreen":"#8ED1B2","verypalegreen":"#C7E6D7","greenishwhite":"#DFEDE8","purplishwhite":"#E8E3E5","bluishwhite":"#E9E9ED","white":"#F2F3F4","yellowishwhite":"#F0EAD6","paleyellowishpink":"#ECD5C5","pinkishwhite":"#EAE3E1","lightgreenishgray":"#B2BEB5","lightpurplishgray":"#BFB9BD","verypalepurplishblue":"#C0C8E1","verypaleviolet":"#C4C3DD","verypaleblue":"#BCD4E6","lightbluishgray":"#B4BCC0","verylightgreenishblue":"#9CD1DC","palegreen":"#8DA399","paleblue":"#91A3B0","pinkishgray":"#C1B6B3","lightgray":"#B9B8B5","brownishpink":"#C2AC99","yellowishgray":"#BFB8A5","lightgrayishyellowishbrown":"#AE9B82","grayishyellowgreen":"#8F9779","lightolivegray":"#8A8776","lightgrayisholive":"#8C8767","lightgrayishbrown":"#958070","lightbrownishgray":"#8E8279","reddishgray":"#8F817F","purplishgray":"#8B8589","bluishgray":"#81878B","mediumgray":"#848482","palepurplishblue":"#8C92AC","greenishgray":"#7D8984","lightgreen":"#6AAB8E","lightbluishgreen":"#66ADA4","brilliantbluishgreen":"#00A693","brilliantgreen":"#3EB489","strongyellowishgreen":"#44944A","vividyellowishgreen":"#27A64C","lightyellowishgreen":"#93C592","moderateyellowishgreen":"#679267","moderateyellowgreen":"#8A9A5B","darkgreenishyellow":"#98943E","darkyellow":"#AB9144","darkgrayishyellow":"#A18F60","grayishyellow":"#C2B280","grayishgreenishyellow":"#B9B57D","moderateyellow":"#C9AE5D","moderategreenishyellow":"#B9B459","lightyellowgreen":"#C9DC89","paleorangeyellow":"#FAD6A5","paleyellowgreen":"#DADFB7","paleyellow":"#F3E5AB","lightyellow":"#F8DE7E","palegreenishyellow":"#EBE8A4","verylightyellowishgreen":"#B6E5AF","brilliantyellowishgreen":"#83D37D","brilliantyellowgreen":"#BDDA57","brilliantgreenishyellow":"#E9E450","lightgreenishyellow":"#EAE679","brilliantyellow":"#FADA5E","vividyellow":"#F3C300","vividgreenishyellow":"#DCD300","stronggreenishyellow":"#BEB72E","strongyellow":"#D4AF37","deepyellow":"#AF8D13","deepgreenishyellow":"#9B9400","vividyellowgreen":"#8DB600","strongyellowgreen":"#7E9F2E","vividgreen":"#008856","deepyellowgreen":"#467129","deepyellowishgreen":"#00622D","moderateolivegreen":"#4A5D23","moderateolive":"#665D1E","lightolive":"#867E36","moderateolivebrown":"#6C541E","deepolivegreen":"#232F00","strongolivegreen":"#404F00","lightolivebrown":"#967117","deeporange":"#BE6516","deepreddishbrown":"#56070C","deepbrown":"#593319","deepyellowishbrown":"#654522","moderatebrown":"#6F4E37","moderateyellowishbrown":"#826644","strongyellowishbrown":"#996515","strongbrown":"#80461B","brownishorange":"#AE6938","darkreddishorange":"#9E4732","strongred":"#BC3F4A","deepreddishorange":"#AA381E","vividred":"#BE0032","strongreddishbrown":"#882D17","vividreddishorange":"#E25822","deepyellowishpink":"#E66721","deeporangeyellow":"#C98500","strongorangeyellow":"#EAA221","vividorangeyellow":"#F6A600","strongorange":"#ED872D","brilliantorange":"#FD943F","vividorange":"#F38400","brilliantorangeyellow":"#FFC14F","lightorangeyellow":"#FBC97F","lightorange":"#FAB57F","vividyellowishpink":"#FFB7A5","strongyellowishpink":"#F99379","moderateorange":"#D99058","moderateorangeyellow":"#E3A857","lightyellowishbrown":"#C19A6B","lightbrown":"#A67B5B","darkorangeyellow":"#BE8A3D","moderatereddishorange":"#CB6D51","grayishreddishorange":"#B4745E","strongreddishorange":"#D9603B","deeppurplishpink":"#DE6FA1","strongpurplishpink":"#E68FAC","deeppink":"#E4717A","darkyellowishpink":"#C48379","darkpink":"#C08081","lightreddishpurple":"#B784A7","darkpurplishpink":"#C17E91","palereddishpurple":"#AA8A9E","paleviolet":"#9690AB","lightgrayishreddishbrown":"#977F73","lightreddishbrown":"#A87C6D","lightgrayishpurplishred":"#AF868E","lightgrayishred":"#AD8884","moderateyellowishpink":"#D9A6A9","moderatepink":"#DEA5A4","grayishyellowishpink":"#C7ADA3","grayishpink":"#C4AEAD","grayishpurplishpink":"#C3A6B1","palepurple":"#AA98A9","moderatepurplishpink":"#D597AE","strongpink":"#EA9399","vividpink":"#FFB5BA","brilliantpurplishpink":"#FFC8D6","lightpurplishpink":"#EFBBCC","verylightpurple":"#D5BADB","verypalepurple":"#D6CADD","palepurplishpink":"#E8CCD7","lightyellowishpink":"#F4C2C2","palepink":"#EAD8D7","lightpink":"#F9CCCA","verylightviolet":"#DCD0FF","brilliantpurple":"#D399E6","lightpurple":"#B695C0","lightpurplishblue":"#8791BF","lightviolet":"#8C82B6","vividviolet":"#9065CA","vividpurple":"#9A4EAE","strongreddishpurple":"#9E4F88","vividpurplishred":"#CE4676","moderatered":"#AB4E52","moderatepurplishred":"#A8516E","strongpurplishred":"#B3446C","moderatereddishpurple":"#915C83","grayishpurplishred":"#915F6D","moderatereddishbrown":"#79443B","grayishred":"#905D5D","grayishreddishbrown":"#674C47","grayishpurple":"#796878","grayishreddishpurple":"#836479","brilliantpurplishblue":"#6C79B8","brilliantviolet":"#7E73B8","moderatepurple":"#86608E","strongpurple":"#875692","strongviolet":"#604E97","strongpurplishblue":"#545AA7","moderatepurplishblue":"#4E5180","moderateviolet":"#604E81","grayishviolet":"#554C69","deeppurple":"#602F6B","verydeepreddishpurple":"#54194E","verydeeppurple":"#401A4C","deepviolet":"#32174D","vividpurplishblue":"#30267A","deeppurplishblue":"#272458","darkviolet":"#2F2140","darkpurplishblue":"#252440","blackishpurple":"#291E29","blackishred":"#2E1D21","verydarkpurplishred":"#38152C","verydarkreddishpurple":"#341731","verydarkpurple":"#301934","darkreddishpurple":"#5D3954","darkpurple":"#563C5C","darkgrayishpurple":"#50404D","darkgrayishred":"#543D3F","darkyellowishbrown":"#4B3621","darkbrown":"#422518","darkgrayishreddishbrown":"#43302E","darkreddishbrown":"#3E1D1E","darkred":"#722F37","darkpurplishred":"#673147","verydeeppurplishred":"#54133B","verydarkred":"#3F1728","deeppurplishred":"#78184A","deepred":"#841B2D","verydeepred":"#5C0923","deepreddishpurple":"#702963","vividreddishpurple":"#870074"}
@@ -0,0 +1 @@
1
+ {"kaitokegreen":"#245336","countygreen":"#1B4B35","zuccini":"#17462E","nordic":"#1D393C","sherpablue":"#00494E","tealblue":"#254855","bluedianne":"#35514F","firefly":"#314643","gablegreen":"#2C4641","daintree":"#273F41","tiber":"#184343","cyprus":"#0F4645","deepteal":"#19443C","zydeco":"#20483F","sherwoodgreen":"#1B4636","englishholly":"#274234","everglade":"#264334","bottlegreen":"#254636","bush":"#254636","burnham":"#234537","celtic":"#2B3F36","timbergreen":"#324336","forestgreen":"#334231","tepapagreen":"#2B4B40","goblin":"#34533D","mallard":"#3A4531","palmleaf":"#36482F","seaweed":"#37412A","olivegreen":"#353F2A","deepfir":"#193925","cardingreen":"#1B3427","palmgreen":"#20392C","holly":"#25342B","blackbean":"#232E26","gordonsgreen":"#29332B","blackforest":"#2C3227","pinetree":"#2A2F23","huntergreen":"#2F3125","eternity":"#2D2F28","rangoongreen":"#2B2E25","marshland":"#2B2E26","greenwaterloo":"#2C2D24","karaka":"#2D2D24","banjul":"#34322D","acadia":"#35312C","darkebony":"#37312B","creole":"#393227","graphite":"#383428","blackmagic":"#332C22","cannonblack":"#332C22","cocoabrown":"#35281E","cola":"#3C2F23","sambuca":"#3B2E25","treehouse":"#3C342E","deepoak":"#3D322C","sepia":"#3A2F2D","coffeebean":"#362D26","cubantan":"#362D26","marlin":"#362D26","woodbark":"#302621","asphalt":"#2A2922","maire":"#2A2922","junglegreen":"#292924","clinker":"#463623","woodburn":"#463629","jackobean":"#413628","birch":"#3F3726","mikado":"#3F3623","ashbrown":"#493F2F","onion":"#48412B","madras":"#473E23","greenkelp":"#393D2A","woodrush":"#45402B","waiouru":"#4C4E31","camouflage":"#4F4D32","thatchgreen":"#544E31","punga":"#534931","deepbronze":"#51412D","tumbleweed":"#4B412A","metallicbronze":"#554A3C","paco":"#4F4037","spaceshuttle":"#4B433B","gravel":"#4A4B46","heavymetal":"#46473E","logcabin":"#393E2E","scrub":"#3D4031","rangitoto":"#3A4133","elpaso":"#39392C","touchwood":"#3A372E","blackpepper":"#3C3731","blackwood":"#3F372E","tobago":"#44362D","slugger":"#42342B","darkrum":"#45362B","bronze":"#493B2F","englishwalnut":"#473B2F","eclipse":"#3F3939","jon":"#463D3E","shark":"#34363A","vulcan":"#36383C","balticsea":"#3C3D3E","montana":"#393B3C","fuscousgrey":"#3C3B3C","kilamanjaro":"#3A3532","mirage":"#373F43","mineshaft":"#373E41","charade":"#394043","zeus":"#3B3C38","tuatara":"#454642","corduroy":"#404D49","armadillo":"#484A46","thunder":"#4D4D4B","matterhorn":"#524B4B","emperor":"#50494A","bleachedcedar":"#454647","steelgrey":"#43464B","tuna":"#46494E","gunpowder":"#484753","rhino":"#3D4653","bluezodiac":"#3C4354","cello":"#3A4E5F","atomic":"#3D4B52","deepcove":"#3A4E58","bigstone":"#334046","nileblue":"#253F4E","greenvogue":"#23414E","tarawera":"#253C48","licorice":"#2E3749","cloudburst":"#353E4F","blackmarlin":"#383740","revolver":"#37363F","grape":"#413D4B","blackrock":"#2C2D3C","haiti":"#2C2A35","lividbrown":"#312A29","diesel":"#322C2B","nightrider":"#332E2E","gondola":"#373332","crowshead":"#32312E","codgrey":"#2D3032","bunker":"#292C2F","bluecharcoal":"#262B2F","bastille":"#2C2C32","woodybay":"#33343A","ebony":"#313337","ebonyclay":"#323438","gunmetal":"#2C3539","oxfordblue":"#28353A","swamp":"#252F2F","oil":"#313330","woodsmoke":"#2B3230","aztec":"#293432","midnightmoss":"#242E28","racinggreen":"#232F2C","bluewhale":"#1E3442","mosaic":"#293741","elephant":"#243640","midnight":"#21303E","tangaroa":"#1E2F3C","cinder":"#242A2E","blackpearl":"#1E272C","bluebark":"#1E272C","blackrussian":"#24252B","jaguar":"#29292F","nero":"#252525","bokaragrey":"#2A2725","outerspace":"#1F263B","midnightexpress":"#21263A","stratos":"#21263A","prussianblue":"#192F41","bunting":"#2B3449","downriver":"#2A344A","capri":"#30436A","bondiblue":"#26416B","catalinablue":"#273C5A","cobalt":"#273C5A","covegrey":"#343F5C","gulfblue":"#343F5C","biscay":"#2F3C53","madison":"#2D3C54","astronautblue":"#214559","regalblue":"#203F58","arapawa":"#274A5D","chambray":"#475877","astronaut":"#445172","eastbay":"#47526E","bahamablue":"#25597F","matisse":"#365C7D","veniceblue":"#2C5778","sttropaz":"#325482","endeavour":"#29598B","bluelagoon":"#00626F","blumine":"#305C71","chathamsblue":"#2C5971","orient":"#255B77","allports":"#1F6A7D","calypso":"#3D7188","jellybean":"#44798E","astral":"#376F89","hippieblue":"#49889A","curiousblue":"#3D85B8","lochmara":"#316EA0","sanmarino":"#4E6C9D","azure":"#4E699A","havelockblue":"#5784C1","waikawagrey":"#5B6E91","kashmirblue":"#576D8E","wedgewood":"#4C6B88","topaz":"#817C87","monsoon":"#7A7679","dovegrey":"#777672","stormgrey":"#747880","regentgrey":"#798488","boulder":"#7C817C","rollingstone":"#6D7876","pigeonpost":"#77848E","lynch":"#697D89","hoki":"#647D86","bluebayoux":"#62777E","sirocco":"#68766E","nevada":"#666F6F","palesky":"#636D70","midgrey":"#666A6D","raven":"#6F747B","aluminium":"#76736F","scarpaflow":"#6B6A6C","empress":"#7C7173","dolphin":"#6A6873","waterloo":"#727282","smoky":"#605D6B","comet":"#636373","fiord":"#4B5A62","sanjuan":"#445761","casal":"#3F545A","brightgrey":"#57595D","tundora":"#585452","mortar":"#565051","donjuan":"#5A4F51","shipgrey":"#4E4E4C","capecod":"#4E5552","mako":"#505555","trout":"#4C5356","darkslate":"#465352","pickledbluewood":"#4F5A5F","riverbed":"#556061","limedspruce":"#4E605E","shuttlegrey":"#61666B","saltbox":"#696268","scorpion":"#6A6466","kabul":"#6C5E53","dorado":"#6E5F56","makara":"#695F50","stormdust":"#65645F","pickledaspen":"#5B6452","chicago":"#5B5D56","battleshipgrey":"#51574F","millbrook":"#595648","cabbagepont":"#4C5544","merlin":"#4F4E48","dune":"#514F4A","masala":"#57534B","smokeyash":"#5D5952","judgegrey":"#5D5346","saddle":"#5D4E46","cork":"#5A4C42","mash":"#5A4C42","rock":"#5A4D41","iroko":"#5B5244","mondo":"#554D42","lisbonbrown":"#544F3A","panda":"#544F3A","kelp":"#4D503C","lunargreen":"#4E5541","hemlock":"#69684B","soyabean":"#6F634B","domino":"#6C5B4C","pinecone":"#756556","coffee":"#726751","peat":"#766D52","pablo":"#7A715C","donkeybrown":"#816E5C","cement":"#857158","squirrel":"#8F7D6B","arrowtown":"#827A67","stonewall":"#807661","sanddune":"#867665","americano":"#8A7D72","hurricane":"#8B7E77","concord":"#827F79","sandstone":"#786D5F","ironsidegrey":"#706E66","flint":"#716E61","limedash":"#676D63","gunsmoke":"#7A7C76","tapa":"#7C7C72","bluesmoke":"#78857A","olivehaze":"#888064","granitegreen":"#8B8265","kokoda":"#7B785A","finch":"#75785A","crocodile":"#706950","siam":"#686B50","cactus":"#5B6F55","axolotl":"#63775A","finlandia":"#61755B","willowgrove":"#69755C","xanadu":"#75876E","cuttysark":"#5C8173","woodland":"#626746","tomthumb":"#4F6348","greygreen":"#525636","spectra":"#375D4F","plantation":"#3E594C","nandor":"#4E5D4E","mineralgreen":"#506355","stromboli":"#406356","viridiangreen":"#4B5F56","oracle":"#395555","taxbreak":"#496569","smaltblue":"#496267","bismark":"#486C7A","ming":"#407577","jade":"#40726D","breakerbay":"#517B78","william":"#53736F","paradiso":"#488084","surfiegreen":"#007B77","elm":"#297B76","genoa":"#31796D","atoll":"#2B797A","seagreen":"#1F6361","bluestone":"#166461","mosque":"#005F5B","eden":"#266255","aquamarine":"#205948","eveningsea":"#26604F","parsley":"#305D35","crusoe":"#165B31","greenpea":"#266242","greenstone":"#246C46","killarney":"#49764F","como":"#4C785C","springgreen":"#5C8A64","amazon":"#387B54","elfgreen":"#1B8A6B","deepsea":"#167E65","observatory":"#008F70","salem":"#177B4D","jewel":"#136843","fungreen":"#15633D","watercourse":"#006E4E","easternblue":"#00879F","pelorous":"#2599B2","scooter":"#308EA0","viking":"#4DB1C8","pictonblue":"#5BA0D0","bostonblue":"#438EAC","shakespeare":"#609AB8","bermudagrey":"#6F8C9F","shipcove":"#7988AB","danube":"#5B89C0","jordyblue":"#7AAAE0","rockblue":"#93A2BA","echoblue":"#A4AFCD","poloblue":"#8AA7CC","malibu":"#66B7E1","seagull":"#77B7D0","glacier":"#78B1BF","anakiwa":"#8CCEEA","sail":"#A5CEEC","tropicalblue":"#AEC9EB","spray":"#7ECDDD","waterleaf":"#B6ECDE","downy":"#6FD2BE","riptide":"#89D9C8","aqua":"#92D3CA","bermuda":"#86D2C1","vistablue":"#97D5B3","fringyflower":"#B4E1BB","chinook":"#9DD3A8","snowymint":"#D6F0CD","riceflower":"#EFF5D1","hintofgreen":"#DFF1D6","blueromance":"#D8F0D2","grannyapple":"#C5E7CD","aeroblue":"#C0E8D5","peppermint":"#D7E7D0","tara":"#DEF1DD","offgreen":"#DFF0E2","frostedmint":"#E2F2E4","minttulip":"#C6EADD","onahau":"#C2E6EC","oysterbay":"#D1EAEA","foam":"#D0EAE8","mabel":"#CBE8E8","iceberg":"#CAE1D9","jaggedice":"#CAE7E2","hummingbird":"#CEEFE4","whiteice":"#D7EEE4","lilywhite":"#E9EEEB","tranquil":"#DDEDE9","clearday":"#DFEFEA","bubbles":"#E6F2EA","zircon":"#DEE3E3","mystic":"#D8DDDA","pattensblue":"#D3E5EF","hawkesblue":"#D2DAED","selago":"#E6DFE7","whitelilac":"#E7E5E8","porcelain":"#DDDCDB","athensgrey":"#DCDDDD","seashell":"#E3E1E0","whisper":"#EFE6E6","softpeach":"#EEDFDE","magnolia":"#EEE8EB","solitude":"#E9ECF1","hintofred":"#F5EFEB","rosewhite":"#FBEEE8","alabaster":"#F2F0E6","romance":"#F4F0E6","sauvignon":"#F4EAE4","wisppink":"#F9E8E2","fantasy":"#F2E6DD","chardon":"#F8EADF","bridalheath":"#F8EBDD","halfpearllusta":"#F1EAD7","butterywhite":"#F1EBDA","orchidwhite":"#F1EBD9","bianca":"#F4EFE0","quarterpearllusta":"#F2EDDD","islandspice":"#F8EDDB","serenade":"#FCE9D7","varden":"#FDEFD3","ginfizz":"#F8EACA","apricotwhite":"#F7F0DB","earlydawn":"#FBF2DB","halfdutchwhite":"#FBF0D6","forgetmenot":"#FDEFDB","chileanheath":"#F9F7DE","promenade":"#F8F6DF","offyellow":"#FAF3DC","rumswizzle":"#F1EDD4","chinaivory":"#FBF3D3","moonglow":"#F5F3CE","whitenectar":"#F8F6D8","hintofyellow":"#F6F5D7","panache":"#EBF7E4","aquaspring":"#E8F3E8","saltpan":"#EEF3E5","twilightblue":"#F4F6EC","sugarcane":"#EEEFDF","ricecake":"#EFECDE","dew":"#E7F2E9","polar":"#E5F2E7","willowbrook":"#DFE6CF","frostee":"#DBE5D2","applegreen":"#DEEADC","swansdown":"#DAE6DD","aquasqueeze":"#DBE4DC","catskillwhite":"#E0E4DC","blacksqueeze":"#E5E6DF","snowdrift":"#E3E3DC","blackwhite":"#E5E4DB","greenwhite":"#DEDDCB","aquahaze":"#D9DDD5","gin":"#D9DFCD","feta":"#DBE0D0","frost":"#E1E4C5","coconutcream":"#E1DABB","scotchmist":"#EEE7C8","halfandhalf":"#EDE7C8","orangewhite":"#EAE3CD","travertine":"#E2DDC7","solitaire":"#EADAC2","halfspanishwhite":"#E6DBC7","pearllusta":"#EAE0C8","pipi":"#F5E6C4","doublepearllusta":"#E9DCBE","eggsour":"#F9E4C5","derby":"#F9E4C6","sazerac":"#F5DEC4","albescentwhite":"#E1DACB","quarterspanishwhite":"#EBE2D2","bleachwhite":"#EBE1CE","cararra":"#EBE5D5","fairpink":"#F3E5DC","pampas":"#EAE4DC","desertstorm":"#EDE7E0","whitelinen":"#EEE7DC","soapstone":"#ECE5DA","narvik":"#E9E6DC","wildsand":"#E7E4DE","wanwhite":"#E4E2DC","springwood":"#E9E1D9","vistawhite":"#E3DFD9","blackhaze":"#E0DED7","ceramic":"#DFDDD6","hintofgrey":"#DFDDD6","seafog":"#DFDDD6","milkwhite":"#DCD9CD","merino":"#E1DBD0","dawnpink":"#E6D6CD","ebb":"#E6D8D4","swisscoffee":"#DBD0CA","bonjour":"#DFD7D2","gallery":"#DCD7D1","whitepointer":"#DAD6CC","swirl":"#D7CEC5","westar":"#D4CFC5","blanc":"#D9D0C1","pearlbush":"#DED1C6","rocksalt":"#E6D6B8","athsspecial":"#D5CBB2","janna":"#DED1B7","spanishwhite":"#DED1B7","wheatfield":"#DFD7BD","loafer":"#DBD9C2","whiterock":"#D4CFB4","orinoco":"#D2D3B3","ottoman":"#D3DBCB","greynurse":"#D1D3CC","ecruwhite":"#D6D1C0","joanna":"#D6D1C0","celeste":"#D2D2C0","moonmist":"#CECDB8","harp":"#CBCEC0","pariswhite":"#BFCDC0","chromewhite":"#CAC7B7","kangaroo":"#C5C3B0","kidnapper":"#BFC0AB","pumice":"#BAC0B4","tasman":"#BAC0B3","berylgreen":"#BCBFA8","parchment":"#D0C8B0","doublespanishwhite":"#D2C3A3","softamber":"#CFBEA5","starkwhite":"#D2C6B6","quillgrey":"#CBC9C0","silversand":"#BEBDB6","cloud":"#C2BCB1","frenchgrey":"#BFBDC1","ghost":"#C0BFC7","paleslate":"#C3BEBB","alto":"#CDC6C5","iron":"#CBCDCD","concrete":"#D2D1CD","mercury":"#D5D2D1","titanwhite":"#DDD6E1","linkwater":"#C7CDD8","bluehaze":"#BDBACE","spindle":"#B3C4D8","zumthor":"#CDD5D5","geyser":"#CBD0CF","nebula":"#B8C6BE","junglemist":"#B0C4C4","tiara":"#B9C3BE","opal":"#A8C3BC","jetstream":"#BBD0C9","frenchpass":"#A4D2E0","regentstblue":"#A0CDD9","morningglory":"#9ED1D3","charlotte":"#A4DCE6","sinbad":"#A6D5D0","icecold":"#AFE3D6","cruise":"#B4E2D5","scandal":"#ADD9D1","gumleaf":"#ACC9B2","zanah":"#B2C6B1","rainee":"#B3C1B1","surfcrest":"#C3D6BD","seamist":"#C2D5C4","edgewater":"#C1D8C5","surf":"#B8D4BB","pixiegreen":"#BBCDA5","paleleaf":"#BDCAA8","springrain":"#A3BD9C","envy":"#8BA58F","mantle":"#96A793","summergreen":"#8FB69C","shadowgreen":"#9AC0B6","seanymph":"#8AAEA4","neptune":"#77A8AB","ziggurat":"#81A6AA","cascade":"#8CA8A0","skeptic":"#9DB4AA","heather":"#AEBBC1","loblolly":"#B3BBB7","periglacialblue":"#ACB6B2","silverchalice":"#ACAEA9","casper":"#AAB5B8","conch":"#A0B1AE","towergrey":"#9CACA5","hitgrey":"#A1A9A8","gullgrey":"#A4ADB0","botticelli":"#92ACB4","nepal":"#93AAB9","spunpearl":"#A2A1AC","mischka":"#A5A9B2","greychateau":"#9FA3A7","nobel":"#A99D9D","mountainmist":"#A09F9C","chatelle":"#B3ABB6","bombay":"#AEAEAD","pinkswan":"#BFB3B2","tide":"#BEB4AB","cottonseed":"#BFBAAF","greynickel":"#BDBAAE","silk":"#BBADA1","grainbrown":"#CAB8A2","vanilla":"#CCB69B","sourdough":"#C9B59A","sisal":"#C5BAA0","coral":"#C0B093","akaroa":"#BEB29A","tea":"#BFB5A2","linen":"#BAB7A2","mistgrey":"#BAB9A9","ash":"#BEBAA7","tana":"#B8B5A1","greenspring":"#A9AF99","robinseggblue":"#9EAA9E","foggygrey":"#A7A69D","stardust":"#A0A197","edward":"#97A49A","bud":"#A5A88F","neutralgreen":"#AAA583","eagle":"#B0AC94","bisonhide":"#B5AC94","martini":"#B7A8A3","cloudy":"#B0A99F","zorba":"#A29589","malta":"#A59784","bronco":"#A79781","nomad":"#A19986","raincloud":"#A39881","napa":"#A39A87","gurkha":"#989171","greyolive":"#A19A7F","delta":"#999B95","dawn":"#9F9D91","lemongrass":"#999A86","schist":"#87876F","bitter":"#88896C","bandicoot":"#878466","paleoyster":"#9C8D72","schooner":"#8D8478","taupegrey":"#898478","heatheredgrey":"#948C7E","friargrey":"#86837A","suvagrey":"#8B8685","jumbo":"#878785","shadylady":"#9F9B9D","greysuit":"#9391A0","santasgrey":"#9998A7","balihai":"#849CA9","powderblue":"#929FA2","submarine":"#8C9C9C","stack":"#858885","oslogrey":"#818988","gumbo":"#718F8A","grannysmith":"#7B948C","juniper":"#74918E","horizon":"#648894","gothic":"#698890","halfbaked":"#558F93","patina":"#639283","spanishgreen":"#7B8976","pewter":"#91A092","laurel":"#6E8D71","oxley":"#6D9A78","bayleaf":"#7BB18D","padua":"#7EB394","acapulco":"#75AA94","gulfstream":"#74B2A8","tradewind":"#6DAFA7","montecarlo":"#7AC5B4","fountainblue":"#65ADB2","bluechill":"#408F90","lochinvar":"#489084","java":"#259797","keppel":"#5FB69C","puertorico":"#59BAA3","silvertree":"#67BE90","niagara":"#29A98B","gossamer":"#399F86","eucalyptus":"#329760","chateaugreen":"#419F59","oceangreen":"#4CA973","deyork":"#85CA87","mantis":"#7FC15C","apple":"#66B348","fruitsalad":"#4BA351","vidaloca":"#5F9228","chelseacucumber":"#88A95B","highland":"#7A9461","avocado":"#95986B","sage":"#989F7A","amulet":"#7D9D72","wasabi":"#849137","highball":"#928C3C","sycamore":"#928C3C","lemonginger":"#968428","reefgold":"#A98D36","alpine":"#AD8A3B","roti":"#B69642","husk":"#B2994B","turmeric":"#AE9041","luxorgold":"#AB8D3F","malachitegreen":"#97976F","canvas":"#A39977","tallow":"#A39977","pavlova":"#BAAB87","hillary":"#A7A07E","yuma":"#C7B882","coriander":"#BBB58D","chino":"#B8AD8A","putty":"#CDAE70","laser":"#C6A95E","tacha":"#D2B960","gimblet":"#B9AD61","caper":"#AFC182","peasoup":"#B9B880","greensmoke":"#9CA664","locust":"#A2A580","norway":"#A4B88F","sprout":"#B8CA9D","greenmist":"#BFC298","pineglade":"#BDC07E","wildrice":"#E3D474","deco":"#CCCF82","sandwisp":"#DECB81","chenin":"#DEC371","cherokee":"#F5CD82","marzipan":"#EBC881","neworleans":"#E4C385","chalky":"#DFC281","zombie":"#DDC283","straw":"#DABE82","raffia":"#DCC6A0","thistle":"#C7BD95","winterhazel":"#D0C383","mintjulep":"#E0D8A7","tahunasands":"#D8CC9B","sapling":"#E1D5A6","beeswax":"#E9D7AB","colonialwhite":"#E9D7AB","astra":"#EDD5A6","givry":"#EBD4AE","dairycream":"#EDD2A4","hampton":"#E8D4A2","doublecolonialwhite":"#E4CF99","chamois":"#E6CC9A","eggwhite":"#E0C88D","splash":"#F1D79E","buttermilk":"#F6E0A4","capehoney":"#FEE0A5","peach":"#FBE5C2","pinklady":"#F3D7B6","champagne":"#EED9B6","bajawhite":"#F0DFBB","dutchwhite":"#F0DFBB","milkpunch":"#F3E5C0","barleywhite":"#F7E5B7","sidecar":"#E9D9A9","halfcolonialwhite":"#F2E5BF","cornfield":"#F8F3C4","springsun":"#F1F1C6","mimosa":"#F5F5CC","oasis":"#FCEDC5","creambrulee":"#FFE39B","salomie":"#FFD67B","goldenglow":"#F9D77E","visvis":"#F9E496","picasso":"#F8EA97","drover":"#FBEB9B","paleprim":"#F9F59F","shalimar":"#F8F6A8","portafino":"#F4F09B","primrose":"#E4DE8E","milan":"#F6F493","tidal":"#F0F590","jonquil":"#EEF293","australianmint":"#EFF8AA","chiffon":"#F0F5BB","tusk":"#E3E5B1","carla":"#F5F9CB","cumulus":"#F5F4C1","snowflurry":"#EAF7C9","madang":"#B7E3A8","gossip":"#9FD385","feijoa":"#A5D785","sulu":"#C6EA80","reef":"#D1EF9F","mindaro":"#DAEA6F","conifer":"#B1DD52","atlantis":"#9CD03B","lime":"#B7C52C","riogrande":"#B7C61A","laspalmas":"#C6DA36","fuego":"#C2D62E","bitterlemon":"#D2DB32","gorse":"#FDE336","goldenfizz":"#EBDE31","canary":"#E2E64D","parisdaisy":"#FBEB50","dolly":"#F5F171","honeysuckle":"#E8ED69","texas":"#ECE67E","witchhaze":"#FBF073","sweetcorn":"#F9E176","turbo":"#F5CC23","goldendream":"#F1CC2B","broom":"#EECC24","energyyellow":"#F5D752","festival":"#EACC4A","sunflower":"#DAC01A","moonyellow":"#F0C420","brightsun":"#ECBD2C","creamcan":"#EEC051","kournikova":"#F9D054","cremedebanane":"#E0C161","goldensand":"#EACE6A","portica":"#F0D555","confetti":"#DDCB46","manz":"#E4DB55","wildwillow":"#BECA60","wattle":"#D6CA3D","starship":"#E3DD39","birdflower":"#D0C117","barberry":"#D2C61F","earlsgreen":"#B8A722","sundance":"#C4AA4D","lemon":"#D9B220","buddhagold":"#BC9B1B","sahara":"#B79826","hacienda":"#9E8022","lucky":"#AB9A1C","citron":"#8E9A21","larioja":"#BAC00E","bahia":"#A9C01C","citrus":"#9FB70A","limerick":"#89AC27","celery":"#B4C04C","sushi":"#7C9F2F","limeade":"#5F9727","lima":"#7AAC21","christi":"#71A91D","camarone":"#206937","sanfelix":"#2C6E31","japaneselaurel":"#2F7532","bilbao":"#3E8027","lapalma":"#428929","gladegreen":"#5F8151","hippiegreen":"#608A5A","dingley":"#607C47","dell":"#486531","greenleaf":"#526B2D","greenhouse":"#3E6334","fern":"#365C34","verdungreen":"#48531A","fernfrond":"#575E2E","clover":"#47562F","saratoga":"#555B2C","chaletgreen":"#5A6E41","fijigreen":"#636F22","pacifika":"#667028","rainforest":"#667028","olivetone":"#747028","trendygreen":"#7E8424","pistachio":"#676927","yukongold":"#826A21","grasshopper":"#7A7229","pesto":"#7A7229","crete":"#77712B","mustard":"#7C6720","cornharvest":"#8D702A","stinger":"#8D702A","claycreek":"#897E59","flax":"#828562","goben":"#786E4C","limedgum":"#6B5B3D","yellowmetal":"#73633E","kumera":"#755B27","acorn":"#736330","himalaya":"#736330","costadelsol":"#625D2A","planter":"#625D2A","verdigris":"#62603E","horsesneck":"#6D562C","westcoast":"#5C512F","bronzeolive":"#584C25","bronzetone":"#434C28","turtlegreen":"#363E1D","pueblo":"#6E3326","perutan":"#733D1F","darkrimu":"#704128","newamber":"#6D3B24","carnabytan":"#5B3A24","brownbramble":"#53331E","saddlebrown":"#50381E","bracken":"#5B3D27","irishcoffee":"#62422B","dallas":"#664A2D","ironbark":"#6D4D2C","caferoyale":"#6A4928","antiquebrass":"#6C461F","capepalliser":"#75482F","cigar":"#7D4E38","walnut":"#794D2E","pottersclay":"#845C40","natural":"#885931","shinglefawn":"#745937","limedoak":"#8C7254","mckenzie":"#8C6338","driftwood":"#8F6F48","rustynail":"#8D5F2C","afghantan":"#905E26","butteredrum":"#9D702E","hottoddy":"#A7752C","brazil":"#815B28","hotcurry":"#815B28","hawaiiantan":"#99522B","renosand":"#B26E33","bamboo":"#BA6F3F","bourbon":"#AF6C3E","oregon":"#B16C39","pumpkin":"#AB6B35","maitai":"#A56531","richgold":"#A15226","piper":"#9D5432","indochine":"#9C5B34","desert":"#A15F3B","redbeech":"#A1623B","tuscany":"#AD6242","santefe":"#A96A50","alerttan":"#954E2C","chelseagem":"#95532F","rope":"#8E593C","paarl":"#864B36","mulefawn":"#884F40","ironstone":"#865040","coppercanyon":"#77422C","peanut":"#7A4434","cumin":"#784430","bullshot":"#75442B","cinnamon":"#7B482B","korma":"#804E2C","prairiesand":"#883C32","crabapple":"#87382F","totempole":"#883531","tabasco":"#8E3A36","embers":"#8C3F30","fire":"#8F3F2A","wellread":"#8E3537","thunderbird":"#923830","mexicanred":"#9B3D3D","roofterracotta":"#A14743","tiamaria":"#97422D","rockspray":"#9D442D","cognac":"#9A463D","mojo":"#97463C","crail":"#A65648","appleblossom":"#A95249","sunglo":"#C76155","flamepea":"#BE5C48","orangeroughy":"#A85335","vesuvius":"#A85533","fieryorange":"#B1592F","redstage":"#AD522E","roseofsharon":"#AC512D","ecstasy":"#C96138","smoketree":"#BB5F34","christine":"#BF652E","tangerine":"#CD5D34","chileanfire":"#D05E34","grenadier":"#C14D36","trinidad":"#C54F33","clementine":"#C14F3B","sunset":"#C0514A","valencia":"#D4574E","mandy":"#CD525B","punch":"#A83239","milanored":"#9E3332","brightred":"#922A31","guardsmanred":"#952E31","flamered":"#86282E","monza":"#86282E","golddrop":"#D56C30","tahitigold":"#DC722A","tango":"#D46F31","pizazz":"#E57F3D","westside":"#E5823A","treepoppy":"#E2813B","flamenco":"#EA8645","sun":"#EF8E38","pirategold":"#BA782A","geebung":"#C5832E","goldenbell":"#CA8136","dixie":"#CD8431","fuelyellow":"#D19033","hokeypokey":"#BB8E34","nugget":"#BC9229","goldtips":"#E2B227","galliano":"#D8A723","corn":"#DFAA28","tuliptree":"#E3AC3D","robroy":"#DDAD56","saffron":"#DC9F45","candlelight":"#E09D37","yellowsea":"#F49F35","buttercup":"#DA9429","firebush":"#E09842","sunshade":"#FA9D49","seabuckthorn":"#EF9548","california":"#E98C3A","lightningyellow":"#F7A233","rajah":"#FCAE60","texasrose":"#FCB057","mysin":"#FDAE45","koromiko":"#FEB552","goldentainoi":"#FFC152","casablanca":"#F0B253","ronchi":"#EAB852","grandis":"#FFCD73","supernova":"#FFB437","caramel":"#FFD59A","sandybeach":"#FEDBB7","frangipani":"#FFD7A0","tequila":"#F4D0A4","negroni":"#EEC7A2","romantic":"#FFC69E","pancho":"#DFB992","brandy":"#DCB68A","maize":"#E3B982","corvette":"#E9BA81","chardonnay":"#FFC878","harvestgold":"#EAB76A","tacao":"#F6AE78","mandyspink":"#F5B799","waxflower":"#EEB39E","rosebud":"#FEAB9A","tonyspink":"#E79E88","hitpink":"#FDA470","apricot":"#E48F67","porsche":"#DF9D5B","diserria":"#D4915D","whiskeysour":"#D4915D","whiskey":"#D29062","apache":"#D3A95C","equator":"#DAB160","calico":"#D5B185","manhattan":"#E2AF80","cameo":"#CCA483","rodeodust":"#C7A384","barleycorn":"#B6935C","sorrellbrown":"#9D7F61","sandal":"#A3876A","mongoose":"#A58B6F","muesli":"#9E7E53","muddywaters":"#A9844F","teak":"#AB8953","tussock":"#BF914B","pizza":"#BF8D3C","marigold":"#B88A3D","mandalay":"#B57B2E","anzac":"#C68E3F","twine":"#C19156","brandypunch":"#C07C40","meteor":"#BB7431","zest":"#C6723B","peachschnapps":"#C68059","burningsand":"#D08363","japonica":"#CE7259","geraldine":"#E77B75","newyorkpink":"#DD8374","monalisa":"#FF9889","crusta":"#F38653","reddamask":"#CB6F4A","sorbus":"#DD6B38","jaffa":"#E27945","flamingo":"#E1634F","persimmon":"#EF735E","roman":"#D8625B","froly":"#E56D75","deepblush":"#E36F8A","hopbush":"#CD6D93","shocking":"#E899BE","illusion":"#EF95AE","kobi":"#E093AB","carissma":"#E68095","wewak":"#F1919A","sweetpink":"#EE918D","seapink":"#DB817E","charm":"#D0748B","contessa":"#C16F68","orientalpink":"#C28E88","tapestry":"#B37084","cancan":"#D08A9B","bouquet":"#A78199","viola":"#C58F9D","wisteria":"#A4878B","londonhue":"#AE94AB","amethystsmoke":"#95879C","logan":"#9D9CB4","opium":"#987E7E","almondfrost":"#9A8678","hemp":"#987D73","brandyrose":"#B6857A","sandrift":"#AF937D","thatch":"#B1948F","delrio":"#B5998E","quicksand":"#C3988B","rose":"#D3A194","eunry":"#CDA59C","cashmere":"#D1B399","clamshell":"#D2B3A9","coldturkey":"#CAB5B2","maverick":"#C8B1C0","dustygrey":"#AC9B9B","lola":"#B9ACBB","lily":"#C19FB3","careyspink":"#C99AA0","petiteorchid":"#DA9790","mypink":"#D68B80","cornflower":"#FFABA0","sundown":"#F8AFA9","yourpink":"#FFC5BB","azalea":"#F9C0C4","blossom":"#DFB1B6","cupid":"#F5B2C5","frenchlilac":"#DEB7D9","classicrose":"#F4C8DB","chantilly":"#EDB8C7","melanie":"#E0B7C2","twilight":"#DAC0CD","pinklace":"#F6CCD7","prim":"#E2CDD5","oysterpink":"#D4B5B0","wafer":"#D4BBB1","justright":"#DCBFAC","bone":"#DBC2AB","shilo":"#E6B2A6","pinkflare":"#D8B4B6","cavernpink":"#E0B8B1","beautybush":"#EBB9B3","coralcandy":"#F5D0C9","watusi":"#F2CDBB","bizarre":"#E7D2C8","duststorm":"#E5CAC0","vanillaice":"#EBD2D1","potpourri":"#EFDCD4","remy":"#F6DEDA","provincialpink":"#F6E3DA","pippin":"#FCDBD2","cinderella":"#FBD7CC","karry":"#FEDCC1","tuftbush":"#F9D3BE","wepeep":"#FDD7D8","cosmos":"#FCD5CF","chablis":"#FDE9E0","bridesmaid":"#FAE6DF","tutu":"#F8E4E3","amour":"#F5E6EA","carouselpink":"#F8DBE0","palerose":"#EFD6DA","snuff":"#E4D7E5","bluechalk":"#E3D6E9","cherub":"#F5D7DC","fog":"#D5C7E8","melrose":"#C3B9DD","prelude":"#CAB4D4","bilobaflower":"#AE99D2","perfume":"#C2A9DB","wistful":"#A29ECD","moonraker":"#C0B2D7","perano":"#ACB9E8","portage":"#8B98D8","coldpurple":"#9D8ABF","eastside":"#AA8CBC","lavender":"#9F90D0","lilacbush":"#9470C4","fuchsia":"#7B5CB7","studio":"#724AA1","daisybush":"#5B3E90","royalheath":"#B54B73","rosebudcherry":"#8A2D52","disco":"#892D4F","lipstick":"#962C54","rouge":"#A94064","cranberry":"#B43864","nightshadz":"#A23D54","hibiscus":"#B33654","cabaret":"#CD526C","blush":"#B55067","hippiepink":"#AB495C","oldbrick":"#8A3335","tallpoppy":"#853534","rosewood":"#8F3E3F","stiletto":"#833D3E","camelot":"#803A4B","vinrouge":"#955264","cadillac":"#984961","strikemaster":"#946A81","finn":"#694554","cosmic":"#794D60","cannonpink":"#8E5164","tosca":"#744042","solidpink":"#85494C","redrobin":"#7D4138","nutmeg":"#7E4A3B","elsalva":"#8F4E45","matrix":"#8E4D45","lotus":"#8B504B","copperrust":"#95524C","turkishrose":"#A56E75","coraltree":"#AB6E67","auchico":"#9E6759","spicymix":"#8B5F4D","leather":"#906A54","toast":"#9F715F","ferra":"#876A68","pharlap":"#826663","russett":"#7D655C","bazaar":"#8F7777","romancoffee":"#7D6757","tobaccobrown":"#6D5843","pickledbean":"#73553E","oldcopper":"#73503B","jambalaya":"#674834","spice":"#6C4F3F","quincy":"#6A5445","congobrown":"#654D49","buccaneer":"#6E5150","zambezi":"#6B5A5A","falcon":"#6E5A5B","mulledwine":"#524D5B","fedora":"#625665","mobster":"#605A67","mamba":"#766D7C","rum":"#716675","spicypink":"#897578","venus":"#8B7D82","deluge":"#8272A4","chetwodeblue":"#666FB4","scampi":"#6F63A0","moodyblue":"#8378C7","truev":"#8E72C7","bluemarguerite":"#6A5BB1","cesoir":"#9271A7","trendypink":"#805D80","affair":"#745085","butterflybush":"#68578C","governorbay":"#51559B","gigas":"#564786","victoria":"#564985","mariner":"#42639F","toryblue":"#374E88","funblue":"#335083","sapphire":"#3F5281","kimberly":"#695D87","bayofmany":"#353E64","jacarta":"#3D325D","portgore":"#3B436C","deepkoamaru":"#343467","toreabay":"#353D75","resolutionblue":"#323F75","jacksonspurple":"#3D3F7D","minsk":"#3E3267","bluegem":"#4B3C8E","bluebell":"#392D73","bluediamond":"#4B2D72","honeyflower":"#5C3C6D","meteorite":"#4A3B6A","hotpurple":"#4E2E53","scarletgum":"#4A2D57","blackcurrant":"#2E183B","plum":"#381A38","christalle":"#382161","parism":"#312760","violentviolet":"#2E2249","paua":"#2A2551","cherrypie":"#372D52","luckypoint":"#292D4F","valhalla":"#2A2B41","jagger":"#3F2E4C","tolopea":"#2D2541","aubergine":"#372528","temptress":"#3C2126","mardigras":"#352235","chocolate":"#3D2327","toledo":"#3E2631","barossa":"#452E39","havana":"#3B2B2C","jarrah":"#3B2B2C","melanzane":"#342931","jacaranda":"#362D38","valentino":"#382C38","violet":"#2F263C","martinique":"#3C3748","voodoo":"#443240","loulou":"#4C3347","bossanova":"#4C3D4E","woodybrown":"#554545","rebel":"#453430","cedar":"#463430","cowboy":"#443736","craterbrown":"#4D3E3C","cocoabean":"#4F3835","vancleef":"#523936","bean":"#4A3531","mahogany":"#483230","cabsav":"#4A2E32","espresso":"#4E312D","cherrywood":"#4E312E","brownderby":"#594537","cioccolato":"#5D3B2E","darkoak":"#55342B","redwood":"#5B342E","indiantan":"#4F301F","moroccobrown":"#442D21","brownpod":"#3C241B","tamarind":"#3E2F2E","maroon":"#402327","rusticred":"#3A181A","bulgarianrose":"#482427","heath":"#4F2A2C","volcano":"#4E2728","lonestar":"#522426","persianred":"#4F212A","bordeaux":"#4C1C24","burntcrimson":"#582124","venetianred":"#5B1F22","redoxide":"#5D1F1E","burgundy":"#652525","reddevil":"#662A2C","darktan":"#612D2D","japanesemaple":"#672F30","moccaccino":"#582F2B","hairyheath":"#633528","meranti":"#6B342A","sanguinebrown":"#6C3736","oiledcedar":"#66362D","metalliccopper":"#6E3D34","crownofthorns":"#763C33","mocha":"#6F372D","kenyancopper":"#6C322E","persianplum":"#683332","merlot":"#73343A","ribbon":"#71333C","jazz":"#5F2C2F","mulberry":"#5E2A40","blackrose":"#532934","wineberry":"#522C35","tawnyport":"#643A48","castro":"#44232F","blackberry":"#43182F","flirt":"#7A2E4D","nightclub":"#6A1F44","pompadour":"#6A1F44","siren":"#69293B","claret":"#6E2233","paprika":"#7C2D37","tamarillo":"#752B2F","lusty":"#782E2C","sangria":"#822A32","shiraz":"#842833","scarlett":"#7E2530","redberry":"#701F28","pohutukawa":"#651C26","hotchile":"#6B252C","monarch":"#6B252C","westernred":"#6B252C","cardinal":"#8A244E","seance":"#69326E","eminence":"#6E3974","clairvoyant":"#683B7D","kingfisherdaisy":"#583580","windsor":"#462C77"}
Binary file
@@ -0,0 +1,90 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # color lists extracted from
4
+ # http://people.csail.mit.edu/jaffer/Color/Dictionaries
5
+ require 'simplecolor'
6
+
7
+ # To parse X11's rgb.txt:
8
+ # c=Pathname.new("rgb.txt")
9
+ # h={}; c.each_line do |l| next if l =~ /^!/; r,g,b,name=l.strip.split(/\s+/,4); h[name.chomp]=SimpleColor::RGB.new([r.to_i,g.to_i,b.to_i]).to_hex end
10
+
11
+ def read_file(filename)
12
+ File.open(filename, "r") do |file|
13
+ if filename.end_with?('.gz')
14
+ serialized_data = Zlib::GzipReader.new(file).read
15
+ else
16
+ serialized_data = file.read
17
+ end
18
+ return JSON.parse(serialized_data)
19
+ end
20
+ end
21
+
22
+ def write_file(h, filename)
23
+ r=nil
24
+ File.open(filename, "w") do |file|
25
+ file=Zlib::GzipWriter.new(file) if filename.end_with?('.gz')
26
+ r=file.write(h.to_json)
27
+ file.close
28
+ end
29
+ return r
30
+ end
31
+
32
+ def load_colors
33
+ @x11=read_file("x11_colors.json")
34
+ @xkcd=read_file("xkcd_colors.json")
35
+ @resene=read_file("Resene2010_colors.json")
36
+ @nbs=read_file("NBS-ISCC_colors.json")
37
+ @colorschemes={
38
+ "solarized_base03" => "#002b36",
39
+ "solarized_base02" => "#073642",
40
+ "solarized_base01" => "#586e75",
41
+ "solarized_base00" => "#657b83",
42
+ "solarized_base0" => "#839496",
43
+ "solarized_base1" => "#93a1a1",
44
+ "solarized_base2" => "#eee8d5",
45
+ "solarized_base3" => "#fdf6e3",
46
+ "solarized_yellow" => "#b58900",
47
+ "solarized_orange" => "#cb4b16",
48
+ "solarized_red" => "#dc322f",
49
+ "solarized_magenta" => "#d33682",
50
+ "solarized_violet" => "#6c71c4",
51
+ "solarized_blue" => "#268bd2",
52
+ "solarized_cyan" => "#2aa198",
53
+ "solarized_green" => "#859900",
54
+ }
55
+
56
+ @keys=->(h) {h.keys.map {|i| SimpleColor::RGB.rgb_clean(i)}}
57
+ end
58
+
59
+ def merge_colors
60
+ h={}
61
+ # first means higher priority for the search
62
+ %i(nbs resene x11 xkcd colorschemes).each do |i|
63
+ h[i]={}
64
+ col=instance_variable_get(:"@#{i}")
65
+ col.each do |k,v|
66
+ h[i][SimpleColor::RGB.rgb_clean(k)]=v
67
+ end
68
+ end
69
+ h
70
+ end
71
+
72
+ def write_colors
73
+ load_colors
74
+ h=merge_colors
75
+ r=write_file(h, "rgb_colors.json.gz")
76
+ puts "Wrote rgb_colors.json.gz: #{r}"
77
+ end
78
+
79
+ # (@keys[@x11] & @keys[@xkcd]).length #=>89
80
+ # (@keys[@x11] & @keys[@resene]).length #=>16
81
+ # (@keys[@x11] & @keys[@nbs]).length #=>15
82
+ # (@keys[@xkcd] & @keys[@resene]).length #=>93
83
+ # (@keys[@xkcd] & @keys[@nbs]).length #=>67
84
+ # (@keys[@resene] & @keys[@nbs]).length #=>0
85
+
86
+ if __FILE__ == $0
87
+ Dir.chdir(File.dirname(__FILE__)) do
88
+ puts write_colors
89
+ end
90
+ end
@@ -0,0 +1 @@
1
+ {"snow":"#FFFAFA","ghost white":"#F8F8FF","GhostWhite":"#F8F8FF","white smoke":"#F5F5F5","WhiteSmoke":"#F5F5F5","gainsboro":"#DCDCDC","floral white":"#FFFAF0","FloralWhite":"#FFFAF0","old lace":"#FDF5E6","OldLace":"#FDF5E6","linen":"#FAF0E6","antique white":"#FAEBD7","AntiqueWhite":"#FAEBD7","papaya whip":"#FFEFD5","PapayaWhip":"#FFEFD5","blanched almond":"#FFEBCD","BlanchedAlmond":"#FFEBCD","bisque":"#FFE4C4","peach puff":"#FFDAB9","PeachPuff":"#FFDAB9","navajo white":"#FFDEAD","NavajoWhite":"#FFDEAD","moccasin":"#FFE4B5","cornsilk":"#FFF8DC","ivory":"#FFFFF0","lemon chiffon":"#FFFACD","LemonChiffon":"#FFFACD","seashell":"#FFF5EE","honeydew":"#F0FFF0","mint cream":"#F5FFFA","MintCream":"#F5FFFA","azure":"#F0FFFF","alice blue":"#F0F8FF","AliceBlue":"#F0F8FF","lavender":"#E6E6FA","lavender blush":"#FFF0F5","LavenderBlush":"#FFF0F5","misty rose":"#FFE4E1","MistyRose":"#FFE4E1","white":"#FFFFFF","black":"#000000","dark slate gray":"#2F4F4F","DarkSlateGray":"#2F4F4F","dark slate grey":"#2F4F4F","DarkSlateGrey":"#2F4F4F","dim gray":"#696969","DimGray":"#696969","dim grey":"#696969","DimGrey":"#696969","slate gray":"#708090","SlateGray":"#708090","slate grey":"#708090","SlateGrey":"#708090","light slate gray":"#778899","LightSlateGray":"#778899","light slate grey":"#778899","LightSlateGrey":"#778899","gray":"#BEBEBE","grey":"#BEBEBE","x11 gray":"#BEBEBE","X11Gray":"#BEBEBE","x11 grey":"#BEBEBE","X11Grey":"#BEBEBE","web gray":"#808080","WebGray":"#808080","web grey":"#808080","WebGrey":"#808080","light grey":"#D3D3D3","LightGrey":"#D3D3D3","light gray":"#D3D3D3","LightGray":"#D3D3D3","midnight blue":"#191970","MidnightBlue":"#191970","navy":"#000080","navy blue":"#000080","NavyBlue":"#000080","cornflower blue":"#6495ED","CornflowerBlue":"#6495ED","dark slate blue":"#483D8B","DarkSlateBlue":"#483D8B","slate blue":"#6A5ACD","SlateBlue":"#6A5ACD","medium slate blue":"#7B68EE","MediumSlateBlue":"#7B68EE","light slate blue":"#8470FF","LightSlateBlue":"#8470FF","medium blue":"#0000CD","MediumBlue":"#0000CD","royal blue":"#4169E1","RoyalBlue":"#4169E1","blue":"#0000FF","dodger blue":"#1E90FF","DodgerBlue":"#1E90FF","deep sky blue":"#00BFFF","DeepSkyBlue":"#00BFFF","sky blue":"#87CEEB","SkyBlue":"#87CEEB","light sky blue":"#87CEFA","LightSkyBlue":"#87CEFA","steel blue":"#4682B4","SteelBlue":"#4682B4","light steel blue":"#B0C4DE","LightSteelBlue":"#B0C4DE","light blue":"#ADD8E6","LightBlue":"#ADD8E6","powder blue":"#B0E0E6","PowderBlue":"#B0E0E6","pale turquoise":"#AFEEEE","PaleTurquoise":"#AFEEEE","dark turquoise":"#00CED1","DarkTurquoise":"#00CED1","medium turquoise":"#48D1CC","MediumTurquoise":"#48D1CC","turquoise":"#40E0D0","cyan":"#00FFFF","aqua":"#00FFFF","light cyan":"#E0FFFF","LightCyan":"#E0FFFF","cadet blue":"#5F9EA0","CadetBlue":"#5F9EA0","medium aquamarine":"#66CDAA","MediumAquamarine":"#66CDAA","aquamarine":"#7FFFD4","dark green":"#006400","DarkGreen":"#006400","dark olive green":"#556B2F","DarkOliveGreen":"#556B2F","dark sea green":"#8FBC8F","DarkSeaGreen":"#8FBC8F","sea green":"#2E8B57","SeaGreen":"#2E8B57","medium sea green":"#3CB371","MediumSeaGreen":"#3CB371","light sea green":"#20B2AA","LightSeaGreen":"#20B2AA","pale green":"#98FB98","PaleGreen":"#98FB98","spring green":"#00FF7F","SpringGreen":"#00FF7F","lawn green":"#7CFC00","LawnGreen":"#7CFC00","green":"#00FF00","lime":"#00FF00","x11 green":"#00FF00","X11Green":"#00FF00","web green":"#008000","WebGreen":"#008000","chartreuse":"#7FFF00","medium spring green":"#00FA9A","MediumSpringGreen":"#00FA9A","green yellow":"#ADFF2F","GreenYellow":"#ADFF2F","lime green":"#32CD32","LimeGreen":"#32CD32","yellow green":"#9ACD32","YellowGreen":"#9ACD32","forest green":"#228B22","ForestGreen":"#228B22","olive drab":"#6B8E23","OliveDrab":"#6B8E23","dark khaki":"#BDB76B","DarkKhaki":"#BDB76B","khaki":"#F0E68C","pale goldenrod":"#EEE8AA","PaleGoldenrod":"#EEE8AA","light goldenrod yellow":"#FAFAD2","LightGoldenrodYellow":"#FAFAD2","light yellow":"#FFFFE0","LightYellow":"#FFFFE0","yellow":"#FFFF00","gold":"#FFD700","light goldenrod":"#EEDD82","LightGoldenrod":"#EEDD82","goldenrod":"#DAA520","dark goldenrod":"#B8860B","DarkGoldenrod":"#B8860B","rosy brown":"#BC8F8F","RosyBrown":"#BC8F8F","indian red":"#CD5C5C","IndianRed":"#CD5C5C","saddle brown":"#8B4513","SaddleBrown":"#8B4513","sienna":"#A0522D","peru":"#CD853F","burlywood":"#DEB887","beige":"#F5F5DC","wheat":"#F5DEB3","sandy brown":"#F4A460","SandyBrown":"#F4A460","tan":"#D2B48C","chocolate":"#D2691E","firebrick":"#B22222","brown":"#A52A2A","dark salmon":"#E9967A","DarkSalmon":"#E9967A","salmon":"#FA8072","light salmon":"#FFA07A","LightSalmon":"#FFA07A","orange":"#FFA500","dark orange":"#FF8C00","DarkOrange":"#FF8C00","coral":"#FF7F50","light coral":"#F08080","LightCoral":"#F08080","tomato":"#FF6347","orange red":"#FF4500","OrangeRed":"#FF4500","red":"#FF0000","hot pink":"#FF69B4","HotPink":"#FF69B4","deep pink":"#FF1493","DeepPink":"#FF1493","pink":"#FFC0CB","light pink":"#FFB6C1","LightPink":"#FFB6C1","pale violet red":"#DB7093","PaleVioletRed":"#DB7093","maroon":"#B03060","x11 maroon":"#B03060","X11Maroon":"#B03060","web maroon":"#800000","WebMaroon":"#800000","medium violet red":"#C71585","MediumVioletRed":"#C71585","violet red":"#D02090","VioletRed":"#D02090","magenta":"#FF00FF","fuchsia":"#FF00FF","violet":"#EE82EE","plum":"#DDA0DD","orchid":"#DA70D6","medium orchid":"#BA55D3","MediumOrchid":"#BA55D3","dark orchid":"#9932CC","DarkOrchid":"#9932CC","dark violet":"#9400D3","DarkViolet":"#9400D3","blue violet":"#8A2BE2","BlueViolet":"#8A2BE2","purple":"#A020F0","x11 purple":"#A020F0","X11Purple":"#A020F0","web purple":"#800080","WebPurple":"#800080","medium purple":"#9370DB","MediumPurple":"#9370DB","thistle":"#D8BFD8","snow1":"#FFFAFA","snow2":"#EEE9E9","snow3":"#CDC9C9","snow4":"#8B8989","seashell1":"#FFF5EE","seashell2":"#EEE5DE","seashell3":"#CDC5BF","seashell4":"#8B8682","AntiqueWhite1":"#FFEFDB","AntiqueWhite2":"#EEDFCC","AntiqueWhite3":"#CDC0B0","AntiqueWhite4":"#8B8378","bisque1":"#FFE4C4","bisque2":"#EED5B7","bisque3":"#CDB79E","bisque4":"#8B7D6B","PeachPuff1":"#FFDAB9","PeachPuff2":"#EECBAD","PeachPuff3":"#CDAF95","PeachPuff4":"#8B7765","NavajoWhite1":"#FFDEAD","NavajoWhite2":"#EECFA1","NavajoWhite3":"#CDB38B","NavajoWhite4":"#8B795E","LemonChiffon1":"#FFFACD","LemonChiffon2":"#EEE9BF","LemonChiffon3":"#CDC9A5","LemonChiffon4":"#8B8970","cornsilk1":"#FFF8DC","cornsilk2":"#EEE8CD","cornsilk3":"#CDC8B1","cornsilk4":"#8B8878","ivory1":"#FFFFF0","ivory2":"#EEEEE0","ivory3":"#CDCDC1","ivory4":"#8B8B83","honeydew1":"#F0FFF0","honeydew2":"#E0EEE0","honeydew3":"#C1CDC1","honeydew4":"#838B83","LavenderBlush1":"#FFF0F5","LavenderBlush2":"#EEE0E5","LavenderBlush3":"#CDC1C5","LavenderBlush4":"#8B8386","MistyRose1":"#FFE4E1","MistyRose2":"#EED5D2","MistyRose3":"#CDB7B5","MistyRose4":"#8B7D7B","azure1":"#F0FFFF","azure2":"#E0EEEE","azure3":"#C1CDCD","azure4":"#838B8B","SlateBlue1":"#836FFF","SlateBlue2":"#7A67EE","SlateBlue3":"#6959CD","SlateBlue4":"#473C8B","RoyalBlue1":"#4876FF","RoyalBlue2":"#436EEE","RoyalBlue3":"#3A5FCD","RoyalBlue4":"#27408B","blue1":"#0000FF","blue2":"#0000EE","blue3":"#0000CD","blue4":"#00008B","DodgerBlue1":"#1E90FF","DodgerBlue2":"#1C86EE","DodgerBlue3":"#1874CD","DodgerBlue4":"#104E8B","SteelBlue1":"#63B8FF","SteelBlue2":"#5CACEE","SteelBlue3":"#4F94CD","SteelBlue4":"#36648B","DeepSkyBlue1":"#00BFFF","DeepSkyBlue2":"#00B2EE","DeepSkyBlue3":"#009ACD","DeepSkyBlue4":"#00688B","SkyBlue1":"#87CEFF","SkyBlue2":"#7EC0EE","SkyBlue3":"#6CA6CD","SkyBlue4":"#4A708B","LightSkyBlue1":"#B0E2FF","LightSkyBlue2":"#A4D3EE","LightSkyBlue3":"#8DB6CD","LightSkyBlue4":"#607B8B","SlateGray1":"#C6E2FF","SlateGray2":"#B9D3EE","SlateGray3":"#9FB6CD","SlateGray4":"#6C7B8B","LightSteelBlue1":"#CAE1FF","LightSteelBlue2":"#BCD2EE","LightSteelBlue3":"#A2B5CD","LightSteelBlue4":"#6E7B8B","LightBlue1":"#BFEFFF","LightBlue2":"#B2DFEE","LightBlue3":"#9AC0CD","LightBlue4":"#68838B","LightCyan1":"#E0FFFF","LightCyan2":"#D1EEEE","LightCyan3":"#B4CDCD","LightCyan4":"#7A8B8B","PaleTurquoise1":"#BBFFFF","PaleTurquoise2":"#AEEEEE","PaleTurquoise3":"#96CDCD","PaleTurquoise4":"#668B8B","CadetBlue1":"#98F5FF","CadetBlue2":"#8EE5EE","CadetBlue3":"#7AC5CD","CadetBlue4":"#53868B","turquoise1":"#00F5FF","turquoise2":"#00E5EE","turquoise3":"#00C5CD","turquoise4":"#00868B","cyan1":"#00FFFF","cyan2":"#00EEEE","cyan3":"#00CDCD","cyan4":"#008B8B","DarkSlateGray1":"#97FFFF","DarkSlateGray2":"#8DEEEE","DarkSlateGray3":"#79CDCD","DarkSlateGray4":"#528B8B","aquamarine1":"#7FFFD4","aquamarine2":"#76EEC6","aquamarine3":"#66CDAA","aquamarine4":"#458B74","DarkSeaGreen1":"#C1FFC1","DarkSeaGreen2":"#B4EEB4","DarkSeaGreen3":"#9BCD9B","DarkSeaGreen4":"#698B69","SeaGreen1":"#54FF9F","SeaGreen2":"#4EEE94","SeaGreen3":"#43CD80","SeaGreen4":"#2E8B57","PaleGreen1":"#9AFF9A","PaleGreen2":"#90EE90","PaleGreen3":"#7CCD7C","PaleGreen4":"#548B54","SpringGreen1":"#00FF7F","SpringGreen2":"#00EE76","SpringGreen3":"#00CD66","SpringGreen4":"#008B45","green1":"#00FF00","green2":"#00EE00","green3":"#00CD00","green4":"#008B00","chartreuse1":"#7FFF00","chartreuse2":"#76EE00","chartreuse3":"#66CD00","chartreuse4":"#458B00","OliveDrab1":"#C0FF3E","OliveDrab2":"#B3EE3A","OliveDrab3":"#9ACD32","OliveDrab4":"#698B22","DarkOliveGreen1":"#CAFF70","DarkOliveGreen2":"#BCEE68","DarkOliveGreen3":"#A2CD5A","DarkOliveGreen4":"#6E8B3D","khaki1":"#FFF68F","khaki2":"#EEE685","khaki3":"#CDC673","khaki4":"#8B864E","LightGoldenrod1":"#FFEC8B","LightGoldenrod2":"#EEDC82","LightGoldenrod3":"#CDBE70","LightGoldenrod4":"#8B814C","LightYellow1":"#FFFFE0","LightYellow2":"#EEEED1","LightYellow3":"#CDCDB4","LightYellow4":"#8B8B7A","yellow1":"#FFFF00","yellow2":"#EEEE00","yellow3":"#CDCD00","yellow4":"#8B8B00","gold1":"#FFD700","gold2":"#EEC900","gold3":"#CDAD00","gold4":"#8B7500","goldenrod1":"#FFC125","goldenrod2":"#EEB422","goldenrod3":"#CD9B1D","goldenrod4":"#8B6914","DarkGoldenrod1":"#FFB90F","DarkGoldenrod2":"#EEAD0E","DarkGoldenrod3":"#CD950C","DarkGoldenrod4":"#8B6508","RosyBrown1":"#FFC1C1","RosyBrown2":"#EEB4B4","RosyBrown3":"#CD9B9B","RosyBrown4":"#8B6969","IndianRed1":"#FF6A6A","IndianRed2":"#EE6363","IndianRed3":"#CD5555","IndianRed4":"#8B3A3A","sienna1":"#FF8247","sienna2":"#EE7942","sienna3":"#CD6839","sienna4":"#8B4726","burlywood1":"#FFD39B","burlywood2":"#EEC591","burlywood3":"#CDAA7D","burlywood4":"#8B7355","wheat1":"#FFE7BA","wheat2":"#EED8AE","wheat3":"#CDBA96","wheat4":"#8B7E66","tan1":"#FFA54F","tan2":"#EE9A49","tan3":"#CD853F","tan4":"#8B5A2B","chocolate1":"#FF7F24","chocolate2":"#EE7621","chocolate3":"#CD661D","chocolate4":"#8B4513","firebrick1":"#FF3030","firebrick2":"#EE2C2C","firebrick3":"#CD2626","firebrick4":"#8B1A1A","brown1":"#FF4040","brown2":"#EE3B3B","brown3":"#CD3333","brown4":"#8B2323","salmon1":"#FF8C69","salmon2":"#EE8262","salmon3":"#CD7054","salmon4":"#8B4C39","LightSalmon1":"#FFA07A","LightSalmon2":"#EE9572","LightSalmon3":"#CD8162","LightSalmon4":"#8B5742","orange1":"#FFA500","orange2":"#EE9A00","orange3":"#CD8500","orange4":"#8B5A00","DarkOrange1":"#FF7F00","DarkOrange2":"#EE7600","DarkOrange3":"#CD6600","DarkOrange4":"#8B4500","coral1":"#FF7256","coral2":"#EE6A50","coral3":"#CD5B45","coral4":"#8B3E2F","tomato1":"#FF6347","tomato2":"#EE5C42","tomato3":"#CD4F39","tomato4":"#8B3626","OrangeRed1":"#FF4500","OrangeRed2":"#EE4000","OrangeRed3":"#CD3700","OrangeRed4":"#8B2500","red1":"#FF0000","red2":"#EE0000","red3":"#CD0000","red4":"#8B0000","DeepPink1":"#FF1493","DeepPink2":"#EE1289","DeepPink3":"#CD1076","DeepPink4":"#8B0A50","HotPink1":"#FF6EB4","HotPink2":"#EE6AA7","HotPink3":"#CD6090","HotPink4":"#8B3A62","pink1":"#FFB5C5","pink2":"#EEA9B8","pink3":"#CD919E","pink4":"#8B636C","LightPink1":"#FFAEB9","LightPink2":"#EEA2AD","LightPink3":"#CD8C95","LightPink4":"#8B5F65","PaleVioletRed1":"#FF82AB","PaleVioletRed2":"#EE799F","PaleVioletRed3":"#CD6889","PaleVioletRed4":"#8B475D","maroon1":"#FF34B3","maroon2":"#EE30A7","maroon3":"#CD2990","maroon4":"#8B1C62","VioletRed1":"#FF3E96","VioletRed2":"#EE3A8C","VioletRed3":"#CD3278","VioletRed4":"#8B2252","magenta1":"#FF00FF","magenta2":"#EE00EE","magenta3":"#CD00CD","magenta4":"#8B008B","orchid1":"#FF83FA","orchid2":"#EE7AE9","orchid3":"#CD69C9","orchid4":"#8B4789","plum1":"#FFBBFF","plum2":"#EEAEEE","plum3":"#CD96CD","plum4":"#8B668B","MediumOrchid1":"#E066FF","MediumOrchid2":"#D15FEE","MediumOrchid3":"#B452CD","MediumOrchid4":"#7A378B","DarkOrchid1":"#BF3EFF","DarkOrchid2":"#B23AEE","DarkOrchid3":"#9A32CD","DarkOrchid4":"#68228B","purple1":"#9B30FF","purple2":"#912CEE","purple3":"#7D26CD","purple4":"#551A8B","MediumPurple1":"#AB82FF","MediumPurple2":"#9F79EE","MediumPurple3":"#8968CD","MediumPurple4":"#5D478B","thistle1":"#FFE1FF","thistle2":"#EED2EE","thistle3":"#CDB5CD","thistle4":"#8B7B8B","gray0":"#000000","grey0":"#000000","gray1":"#030303","grey1":"#030303","gray2":"#050505","grey2":"#050505","gray3":"#080808","grey3":"#080808","gray4":"#0A0A0A","grey4":"#0A0A0A","gray5":"#0D0D0D","grey5":"#0D0D0D","gray6":"#0F0F0F","grey6":"#0F0F0F","gray7":"#121212","grey7":"#121212","gray8":"#141414","grey8":"#141414","gray9":"#171717","grey9":"#171717","gray10":"#1A1A1A","grey10":"#1A1A1A","gray11":"#1C1C1C","grey11":"#1C1C1C","gray12":"#1F1F1F","grey12":"#1F1F1F","gray13":"#212121","grey13":"#212121","gray14":"#242424","grey14":"#242424","gray15":"#262626","grey15":"#262626","gray16":"#292929","grey16":"#292929","gray17":"#2B2B2B","grey17":"#2B2B2B","gray18":"#2E2E2E","grey18":"#2E2E2E","gray19":"#303030","grey19":"#303030","gray20":"#333333","grey20":"#333333","gray21":"#363636","grey21":"#363636","gray22":"#383838","grey22":"#383838","gray23":"#3B3B3B","grey23":"#3B3B3B","gray24":"#3D3D3D","grey24":"#3D3D3D","gray25":"#404040","grey25":"#404040","gray26":"#424242","grey26":"#424242","gray27":"#454545","grey27":"#454545","gray28":"#474747","grey28":"#474747","gray29":"#4A4A4A","grey29":"#4A4A4A","gray30":"#4D4D4D","grey30":"#4D4D4D","gray31":"#4F4F4F","grey31":"#4F4F4F","gray32":"#525252","grey32":"#525252","gray33":"#545454","grey33":"#545454","gray34":"#575757","grey34":"#575757","gray35":"#595959","grey35":"#595959","gray36":"#5C5C5C","grey36":"#5C5C5C","gray37":"#5E5E5E","grey37":"#5E5E5E","gray38":"#616161","grey38":"#616161","gray39":"#636363","grey39":"#636363","gray40":"#666666","grey40":"#666666","gray41":"#696969","grey41":"#696969","gray42":"#6B6B6B","grey42":"#6B6B6B","gray43":"#6E6E6E","grey43":"#6E6E6E","gray44":"#707070","grey44":"#707070","gray45":"#737373","grey45":"#737373","gray46":"#757575","grey46":"#757575","gray47":"#787878","grey47":"#787878","gray48":"#7A7A7A","grey48":"#7A7A7A","gray49":"#7D7D7D","grey49":"#7D7D7D","gray50":"#7F7F7F","grey50":"#7F7F7F","gray51":"#828282","grey51":"#828282","gray52":"#858585","grey52":"#858585","gray53":"#878787","grey53":"#878787","gray54":"#8A8A8A","grey54":"#8A8A8A","gray55":"#8C8C8C","grey55":"#8C8C8C","gray56":"#8F8F8F","grey56":"#8F8F8F","gray57":"#919191","grey57":"#919191","gray58":"#949494","grey58":"#949494","gray59":"#969696","grey59":"#969696","gray60":"#999999","grey60":"#999999","gray61":"#9C9C9C","grey61":"#9C9C9C","gray62":"#9E9E9E","grey62":"#9E9E9E","gray63":"#A1A1A1","grey63":"#A1A1A1","gray64":"#A3A3A3","grey64":"#A3A3A3","gray65":"#A6A6A6","grey65":"#A6A6A6","gray66":"#A8A8A8","grey66":"#A8A8A8","gray67":"#ABABAB","grey67":"#ABABAB","gray68":"#ADADAD","grey68":"#ADADAD","gray69":"#B0B0B0","grey69":"#B0B0B0","gray70":"#B3B3B3","grey70":"#B3B3B3","gray71":"#B5B5B5","grey71":"#B5B5B5","gray72":"#B8B8B8","grey72":"#B8B8B8","gray73":"#BABABA","grey73":"#BABABA","gray74":"#BDBDBD","grey74":"#BDBDBD","gray75":"#BFBFBF","grey75":"#BFBFBF","gray76":"#C2C2C2","grey76":"#C2C2C2","gray77":"#C4C4C4","grey77":"#C4C4C4","gray78":"#C7C7C7","grey78":"#C7C7C7","gray79":"#C9C9C9","grey79":"#C9C9C9","gray80":"#CCCCCC","grey80":"#CCCCCC","gray81":"#CFCFCF","grey81":"#CFCFCF","gray82":"#D1D1D1","grey82":"#D1D1D1","gray83":"#D4D4D4","grey83":"#D4D4D4","gray84":"#D6D6D6","grey84":"#D6D6D6","gray85":"#D9D9D9","grey85":"#D9D9D9","gray86":"#DBDBDB","grey86":"#DBDBDB","gray87":"#DEDEDE","grey87":"#DEDEDE","gray88":"#E0E0E0","grey88":"#E0E0E0","gray89":"#E3E3E3","grey89":"#E3E3E3","gray90":"#E5E5E5","grey90":"#E5E5E5","gray91":"#E8E8E8","grey91":"#E8E8E8","gray92":"#EBEBEB","grey92":"#EBEBEB","gray93":"#EDEDED","grey93":"#EDEDED","gray94":"#F0F0F0","grey94":"#F0F0F0","gray95":"#F2F2F2","grey95":"#F2F2F2","gray96":"#F5F5F5","grey96":"#F5F5F5","gray97":"#F7F7F7","grey97":"#F7F7F7","gray98":"#FAFAFA","grey98":"#FAFAFA","gray99":"#FCFCFC","grey99":"#FCFCFC","gray100":"#FFFFFF","grey100":"#FFFFFF","dark grey":"#A9A9A9","DarkGrey":"#A9A9A9","dark gray":"#A9A9A9","DarkGray":"#A9A9A9","dark blue":"#00008B","DarkBlue":"#00008B","dark cyan":"#008B8B","DarkCyan":"#008B8B","dark magenta":"#8B008B","DarkMagenta":"#8B008B","dark red":"#8B0000","DarkRed":"#8B0000","light green":"#90EE90","LightGreen":"#90EE90","crimson":"#DC143C","indigo":"#4B0082","olive":"#808000","rebecca purple":"#663399","RebeccaPurple":"#663399","silver":"#C0C0C0","teal":"#008080"}
@@ -0,0 +1 @@
1
+ {"cloudy blue":"#acc2d9","dark pastel green":"#56ae57","dust":"#b2996e","electric lime":"#a8ff04","fresh green":"#69d84f","light eggplant":"#894585","nasty green":"#70b23f","really light blue":"#d4ffff","tea":"#65ab7c","warm purple":"#952e8f","yellowish tan":"#fcfc81","cement":"#a5a391","dark grass green":"#388004","dusty teal":"#4c9085","grey teal":"#5e9b8a","macaroni and cheese":"#efb435","pinkish tan":"#d99b82","spruce":"#0a5f38","strong blue":"#0c06f7","toxic green":"#61de2a","windows blue":"#3778bf","blue blue":"#2242c7","blue with a hint of purple":"#533cc6","booger":"#9bb53c","bright sea green":"#05ffa6","dark green blue":"#1f6357","deep turquoise":"#017374","green teal":"#0cb577","strong pink":"#ff0789","bland":"#afa88b","deep aqua":"#08787f","lavender pink":"#dd85d7","light moss green":"#a6c875","light seafoam green":"#a7ffb5","olive yellow":"#c2b709","pig pink":"#e78ea5","deep lilac":"#966ebd","desert":"#ccad60","dusty lavender":"#ac86a8","purpley grey":"#947e94","purply":"#983fb2","candy pink":"#ff63e9","light pastel green":"#b2fba5","boring green":"#63b365","kiwi green":"#8ee53f","light grey green":"#b7e1a1","orange pink":"#ff6f52","tea green":"#bdf8a3","very light brown":"#d3b683","egg shell":"#fffcc4","eggplant purple":"#430541","powder pink":"#ffb2d0","reddish grey":"#997570","baby shit brown":"#ad900d","liliac":"#c48efd","stormy blue":"#507b9c","ugly brown":"#7d7103","custard":"#fffd78","darkish pink":"#da467d","deep brown":"#410200","greenish beige":"#c9d179","manilla":"#fffa86","off blue":"#5684ae","battleship grey":"#6b7c85","browny green":"#6f6c0a","bruise":"#7e4071","kelley green":"#009337","sickly yellow":"#d0e429","sunny yellow":"#fff917","azul":"#1d5dec","darkgreen":"#054907","green/yellow":"#b5ce08","lichen":"#8fb67b","light light green":"#c8ffb0","pale gold":"#fdde6c","sun yellow":"#ffdf22","tan green":"#a9be70","burple":"#6832e3","butterscotch":"#fdb147","toupe":"#c7ac7d","dark cream":"#fff39a","indian red":"#850e04","light lavendar":"#efc0fe","poison green":"#40fd14","baby puke green":"#b6c406","bright yellow green":"#9dff00","charcoal grey":"#3c4142","squash":"#f2ab15","cinnamon":"#ac4f06","light pea green":"#c4fe82","radioactive green":"#2cfa1f","raw sienna":"#9a6200","baby purple":"#ca9bf7","cocoa":"#875f42","light royal blue":"#3a2efe","orangeish":"#fd8d49","rust brown":"#8b3103","sand brown":"#cba560","swamp":"#698339","tealish green":"#0cdc73","burnt siena":"#b75203","camo":"#7f8f4e","dusk blue":"#26538d","fern":"#63a950","old rose":"#c87f89","pale light green":"#b1fc99","peachy pink":"#ff9a8a","rosy pink":"#f6688e","light bluish green":"#76fda8","light bright green":"#53fe5c","light neon green":"#4efd54","light seafoam":"#a0febf","tiffany blue":"#7bf2da","washed out green":"#bcf5a6","browny orange":"#ca6b02","nice blue":"#107ab0","sapphire":"#2138ab","greyish teal":"#719f91","orangey yellow":"#fdb915","parchment":"#fefcaf","straw":"#fcf679","very dark brown":"#1d0200","terracota":"#cb6843","ugly blue":"#31668a","clear blue":"#247afd","creme":"#ffffb6","foam green":"#90fda9","grey/green":"#86a17d","light gold":"#fddc5c","seafoam blue":"#78d1b6","topaz":"#13bbaf","violet pink":"#fb5ffc","wintergreen":"#20f986","yellow tan":"#ffe36e","dark fuchsia":"#9d0759","indigo blue":"#3a18b1","light yellowish green":"#c2ff89","pale magenta":"#d767ad","rich purple":"#720058","sunflower yellow":"#ffda03","green/blue":"#01c08d","leather":"#ac7434","racing green":"#014600","vivid purple":"#9900fa","dark royal blue":"#02066f","hazel":"#8e7618","muted pink":"#d1768f","booger green":"#96b403","canary":"#fdff63","cool grey":"#95a3a6","dark taupe":"#7f684e","darkish purple":"#751973","true green":"#089404","coral pink":"#ff6163","dark sage":"#598556","dark slate blue":"#214761","flat blue":"#3c73a8","mushroom":"#ba9e88","rich blue":"#021bf9","dirty purple":"#734a65","greenblue":"#23c48b","icky green":"#8fae22","light khaki":"#e6f2a2","warm blue":"#4b57db","dark hot pink":"#d90166","deep sea blue":"#015482","carmine":"#9d0216","dark yellow green":"#728f02","pale peach":"#ffe5ad","plum purple":"#4e0550","golden rod":"#f9bc08","neon red":"#ff073a","old pink":"#c77986","very pale blue":"#d6fffe","blood orange":"#fe4b03","grapefruit":"#fd5956","sand yellow":"#fce166","clay brown":"#b2713d","dark blue grey":"#1f3b4d","flat green":"#699d4c","light green blue":"#56fca2","warm pink":"#fb5581","dodger blue":"#3e82fc","gross green":"#a0bf16","ice":"#d6fffa","metallic blue":"#4f738e","pale salmon":"#ffb19a","sap green":"#5c8b15","algae":"#54ac68","bluey grey":"#89a0b0","greeny grey":"#7ea07a","highlighter green":"#1bfc06","light light blue":"#cafffb","light mint":"#b6ffbb","raw umber":"#a75e09","vivid blue":"#152eff","deep lavender":"#8d5eb7","dull teal":"#5f9e8f","light greenish blue":"#63f7b4","mud green":"#606602","pinky":"#fc86aa","red wine":"#8c0034","shit green":"#758000","tan brown":"#ab7e4c","darkblue":"#030764","rosa":"#fe86a4","lipstick":"#d5174e","pale mauve":"#fed0fc","claret":"#680018","dandelion":"#fedf08","orangered":"#fe420f","poop green":"#6f7c00","ruby":"#ca0147","dark":"#1b2431","greenish turquoise":"#00fbb0","pastel red":"#db5856","piss yellow":"#ddd618","bright cyan":"#41fdfe","dark coral":"#cf524e","algae green":"#21c36f","darkish red":"#a90308","reddy brown":"#6e1005","blush pink":"#fe828c","camouflage green":"#4b6113","lawn green":"#4da409","putty":"#beae8a","vibrant blue":"#0339f8","dark sand":"#a88f59","purple/blue":"#5d21d0","saffron":"#feb209","twilight":"#4e518b","warm brown":"#964e02","bluegrey":"#85a3b2","bubble gum pink":"#ff69af","duck egg blue":"#c3fbf4","greenish cyan":"#2afeb7","petrol":"#005f6a","royal":"#0c1793","butter":"#ffff81","dusty orange":"#f0833a","off yellow":"#f1f33f","pale olive green":"#b1d27b","orangish":"#fc824a","leaf":"#71aa34","light blue grey":"#b7c9e2","dried blood":"#4b0101","lightish purple":"#a552e6","rusty red":"#af2f0d","lavender blue":"#8b88f8","light grass green":"#9af764","light mint green":"#a6fbb2","sunflower":"#ffc512","velvet":"#750851","brick orange":"#c14a09","lightish red":"#fe2f4a","pure blue":"#0203e2","twilight blue":"#0a437a","violet red":"#a50055","yellowy brown":"#ae8b0c","carnation":"#fd798f","muddy yellow":"#bfac05","dark seafoam green":"#3eaf76","deep rose":"#c74767","dusty red":"#b9484e","grey/blue":"#647d8e","lemon lime":"#bffe28","purple/pink":"#d725de","brown yellow":"#b29705","purple brown":"#673a3f","wisteria":"#a87dc2","banana yellow":"#fafe4b","lipstick red":"#c0022f","water blue":"#0e87cc","brown grey":"#8d8468","vibrant purple":"#ad03de","baby green":"#8cff9e","barf green":"#94ac02","eggshell blue":"#c4fff7","sandy yellow":"#fdee73","cool green":"#33b864","pale":"#fff9d0","blue/grey":"#758da3","hot magenta":"#f504c9","greyblue":"#77a1b5","purpley":"#8756e4","baby shit green":"#889717","brownish pink":"#c27e79","dark aquamarine":"#017371","diarrhea":"#9f8303","light mustard":"#f7d560","pale sky blue":"#bdf6fe","turtle green":"#75b84f","bright olive":"#9cbb04","dark grey blue":"#29465b","greeny brown":"#696006","lemon green":"#adf802","light periwinkle":"#c1c6fc","seaweed green":"#35ad6b","sunshine yellow":"#fffd37","ugly purple":"#a442a0","medium pink":"#f36196","puke brown":"#947706","very light pink":"#fff4f2","viridian":"#1e9167","bile":"#b5c306","faded yellow":"#feff7f","very pale green":"#cffdbc","vibrant green":"#0add08","bright lime":"#87fd05","spearmint":"#1ef876","light aquamarine":"#7bfdc7","light sage":"#bcecac","yellowgreen":"#bbf90f","baby poo":"#ab9004","dark seafoam":"#1fb57a","deep teal":"#00555a","heather":"#a484ac","rust orange":"#c45508","dirty blue":"#3f829d","fern green":"#548d44","bright lilac":"#c95efb","weird green":"#3ae57f","peacock blue":"#016795","avocado green":"#87a922","faded orange":"#f0944d","grape purple":"#5d1451","hot green":"#25ff29","lime yellow":"#d0fe1d","mango":"#ffa62b","shamrock":"#01b44c","bubblegum":"#ff6cb5","purplish brown":"#6b4247","vomit yellow":"#c7c10c","pale cyan":"#b7fffa","key lime":"#aeff6e","tomato red":"#ec2d01","lightgreen":"#76ff7b","merlot":"#730039","night blue":"#040348","purpleish pink":"#df4ec8","apple":"#6ecb3c","baby poop green":"#8f9805","green apple":"#5edc1f","heliotrope":"#d94ff5","yellow/green":"#c8fd3d","almost black":"#070d0d","cool blue":"#4984b8","leafy green":"#51b73b","mustard brown":"#ac7e04","dusk":"#4e5481","dull brown":"#876e4b","frog green":"#58bc08","vivid green":"#2fef10","bright light green":"#2dfe54","fluro green":"#0aff02","kiwi":"#9cef43","seaweed":"#18d17b","navy green":"#35530a","ultramarine blue":"#1805db","iris":"#6258c4","pastel orange":"#ff964f","yellowish orange":"#ffab0f","perrywinkle":"#8f8ce7","tealish":"#24bca8","dark plum":"#3f012c","pear":"#cbf85f","pinkish orange":"#ff724c","midnight purple":"#280137","light urple":"#b36ff6","dark mint":"#48c072","greenish tan":"#bccb7a","light burgundy":"#a8415b","turquoise blue":"#06b1c4","ugly pink":"#cd7584","sandy":"#f1da7a","electric pink":"#ff0490","muted purple":"#805b87","mid green":"#50a747","greyish":"#a8a495","neon yellow":"#cfff04","banana":"#ffff7e","carnation pink":"#ff7fa7","tomato":"#ef4026","sea":"#3c9992","muddy brown":"#886806","turquoise green":"#04f489","buff":"#fef69e","fawn":"#cfaf7b","muted blue":"#3b719f","pale rose":"#fdc1c5","dark mint green":"#20c073","amethyst":"#9b5fc0","blue/green":"#0f9b8e","chestnut":"#742802","sick green":"#9db92c","pea":"#a4bf20","rusty orange":"#cd5909","stone":"#ada587","rose red":"#be013c","pale aqua":"#b8ffeb","deep orange":"#dc4d01","earth":"#a2653e","mossy green":"#638b27","grassy green":"#419c03","pale lime green":"#b1ff65","light grey blue":"#9dbcd4","pale grey":"#fdfdfe","asparagus":"#77ab56","blueberry":"#464196","purple red":"#990147","pale lime":"#befd73","greenish teal":"#32bf84","caramel":"#af6f09","deep magenta":"#a0025c","light peach":"#ffd8b1","milk chocolate":"#7f4e1e","ocher":"#bf9b0c","off green":"#6ba353","purply pink":"#f075e6","lightblue":"#7bc8f6","dusky blue":"#475f94","golden":"#f5bf03","light beige":"#fffeb6","butter yellow":"#fffd74","dusky purple":"#895b7b","french blue":"#436bad","ugly yellow":"#d0c101","greeny yellow":"#c6f808","orangish red":"#f43605","shamrock green":"#02c14d","orangish brown":"#b25f03","tree green":"#2a7e19","deep violet":"#490648","gunmetal":"#536267","blue/purple":"#5a06ef","cherry":"#cf0234","sandy brown":"#c4a661","warm grey":"#978a84","dark indigo":"#1f0954","midnight":"#03012d","bluey green":"#2bb179","grey pink":"#c3909b","soft purple":"#a66fb5","blood":"#770001","brown red":"#922b05","medium grey":"#7d7f7c","berry":"#990f4b","poo":"#8f7303","purpley pink":"#c83cb9","light salmon":"#fea993","snot":"#acbb0d","easter purple":"#c071fe","light yellow green":"#ccfd7f","dark navy blue":"#00022e","drab":"#828344","light rose":"#ffc5cb","rouge":"#ab1239","purplish red":"#b0054b","slime green":"#99cc04","baby poop":"#937c00","irish green":"#019529","pink/purple":"#ef1de7","dark navy":"#000435","greeny blue":"#42b395","light plum":"#9d5783","pinkish grey":"#c8aca9","dirty orange":"#c87606","rust red":"#aa2704","pale lilac":"#e4cbff","orangey red":"#fa4224","primary blue":"#0804f9","kermit green":"#5cb200","brownish purple":"#76424e","murky green":"#6c7a0e","wheat":"#fbdd7e","very dark purple":"#2a0134","bottle green":"#044a05","watermelon":"#fd4659","deep sky blue":"#0d75f8","fire engine red":"#fe0002","yellow ochre":"#cb9d06","pumpkin orange":"#fb7d07","pale olive":"#b9cc81","light lilac":"#edc8ff","lightish green":"#61e160","carolina blue":"#8ab8fe","mulberry":"#920a4e","shocking pink":"#fe02a2","auburn":"#9a3001","bright lime green":"#65fe08","celadon":"#befdb7","pinkish brown":"#b17261","poo brown":"#885f01","bright sky blue":"#02ccfe","celery":"#c1fd95","dirt brown":"#836539","strawberry":"#fb2943","dark lime":"#84b701","copper":"#b66325","medium brown":"#7f5112","muted green":"#5fa052","robin's egg":"#6dedfd","bright aqua":"#0bf9ea","bright lavender":"#c760ff","ivory":"#ffffcb","very light purple":"#f6cefc","light navy":"#155084","pink red":"#f5054f","olive brown":"#645403","poop brown":"#7a5901","mustard green":"#a8b504","ocean green":"#3d9973","very dark blue":"#000133","dusty green":"#76a973","light navy blue":"#2e5a88","minty green":"#0bf77d","adobe":"#bd6c48","barney":"#ac1db8","jade green":"#2baf6a","bright light blue":"#26f7fd","light lime":"#aefd6c","dark khaki":"#9b8f55","orange yellow":"#ffad01","ocre":"#c69c04","maize":"#f4d054","faded pink":"#de9dac","british racing green":"#05480d","sandstone":"#c9ae74","mud brown":"#60460f","light sea green":"#98f6b0","robin egg blue":"#8af1fe","aqua marine":"#2ee8bb","dark sea green":"#11875d","soft pink":"#fdb0c0","orangey brown":"#b16002","cherry red":"#f7022a","burnt yellow":"#d5ab09","brownish grey":"#86775f","camel":"#c69f59","purplish grey":"#7a687f","marine":"#042e60","greyish pink":"#c88d94","pale turquoise":"#a5fbd5","pastel yellow":"#fffe71","bluey purple":"#6241c7","canary yellow":"#fffe40","faded red":"#d3494e","sepia":"#985e2b","coffee":"#a6814c","bright magenta":"#ff08e8","mocha":"#9d7651","ecru":"#feffca","purpleish":"#98568d","cranberry":"#9e003a","darkish green":"#287c37","brown orange":"#b96902","dusky rose":"#ba6873","melon":"#ff7855","sickly green":"#94b21c","silver":"#c5c9c7","purply blue":"#661aee","purpleish blue":"#6140ef","hospital green":"#9be5aa","shit brown":"#7b5804","mid blue":"#276ab3","amber":"#feb308","easter green":"#8cfd7e","soft blue":"#6488ea","cerulean blue":"#056eee","golden brown":"#b27a01","bright turquoise":"#0ffef9","red pink":"#fa2a55","red purple":"#820747","greyish brown":"#7a6a4f","vermillion":"#f4320c","russet":"#a13905","steel grey":"#6f828a","lighter purple":"#a55af4","bright violet":"#ad0afd","prussian blue":"#004577","slate green":"#658d6d","dirty pink":"#ca7b80","dark blue green":"#005249","pine":"#2b5d34","yellowy green":"#bff128","dark gold":"#b59410","bluish":"#2976bb","darkish blue":"#014182","dull red":"#bb3f3f","pinky red":"#fc2647","bronze":"#a87900","pale teal":"#82cbb2","military green":"#667c3e","barbie pink":"#fe46a5","bubblegum pink":"#fe83cc","pea soup green":"#94a617","dark mustard":"#a88905","shit":"#7f5f00","medium purple":"#9e43a2","very dark green":"#062e03","dirt":"#8a6e45","dusky pink":"#cc7a8b","red violet":"#9e0168","lemon yellow":"#fdff38","pistachio":"#c0fa8b","dull yellow":"#eedc5b","dark lime green":"#7ebd01","denim blue":"#3b5b92","teal blue":"#01889f","lightish blue":"#3d7afd","purpley blue":"#5f34e7","light indigo":"#6d5acf","swamp green":"#748500","brown green":"#706c11","dark maroon":"#3c0008","hot purple":"#cb00f5","dark forest green":"#002d04","faded blue":"#658cbb","drab green":"#749551","light lime green":"#b9ff66","snot green":"#9dc100","yellowish":"#faee66","light blue green":"#7efbb3","bordeaux":"#7b002c","light mauve":"#c292a1","ocean":"#017b92","marigold":"#fcc006","muddy green":"#657432","dull orange":"#d8863b","steel":"#738595","electric purple":"#aa23ff","fluorescent green":"#08ff08","yellowish brown":"#9b7a01","blush":"#f29e8e","soft green":"#6fc276","bright orange":"#ff5b00","lemon":"#fdff52","purple grey":"#866f85","acid green":"#8ffe09","pale lavender":"#eecffe","violet blue":"#510ac9","light forest green":"#4f9153","burnt red":"#9f2305","khaki green":"#728639","cerise":"#de0c62","faded purple":"#916e99","apricot":"#ffb16d","dark olive green":"#3c4d03","grey brown":"#7f7053","green grey":"#77926f","true blue":"#010fcc","pale violet":"#ceaefa","periwinkle blue":"#8f99fb","light sky blue":"#c6fcff","blurple":"#5539cc","green brown":"#544e03","bluegreen":"#017a79","bright teal":"#01f9c6","brownish yellow":"#c9b003","pea soup":"#929901","forest":"#0b5509","barney purple":"#a00498","ultramarine":"#2000b1","purplish":"#94568c","puke yellow":"#c2be0e","bluish grey":"#748b97","dark periwinkle":"#665fd1","dark lilac":"#9c6da5","reddish":"#c44240","light maroon":"#a24857","dusty purple":"#825f87","terra cotta":"#c9643b","avocado":"#90b134","marine blue":"#01386a","teal green":"#25a36f","slate grey":"#59656d","lighter green":"#75fd63","electric green":"#21fc0d","dusty blue":"#5a86ad","golden yellow":"#fec615","bright yellow":"#fffd01","light lavender":"#dfc5fe","umber":"#b26400","poop":"#7f5e00","dark peach":"#de7e5d","jungle green":"#048243","eggshell":"#ffffd4","denim":"#3b638c","yellow brown":"#b79400","dull purple":"#84597e","chocolate brown":"#411900","wine red":"#7b0323","neon blue":"#04d9ff","dirty green":"#667e2c","light tan":"#fbeeac","ice blue":"#d7fffe","cadet blue":"#4e7496","dark mauve":"#874c62","very light blue":"#d5ffff","grey purple":"#826d8c","pastel pink":"#ffbacd","very light green":"#d1ffbd","dark sky blue":"#448ee4","evergreen":"#05472a","dull pink":"#d5869d","aubergine":"#3d0734","mahogany":"#4a0100","reddish orange":"#f8481c","deep green":"#02590f","vomit green":"#89a203","purple pink":"#e03fd8","dusty pink":"#d58a94","faded green":"#7bb274","camo green":"#526525","pinky purple":"#c94cbe","pink purple":"#db4bda","brownish red":"#9e3623","dark rose":"#b5485d","mud":"#735c12","brownish":"#9c6d57","emerald green":"#028f1e","pale brown":"#b1916e","dull blue":"#49759c","burnt umber":"#a0450e","medium green":"#39ad48","clay":"#b66a50","light aqua":"#8cffdb","light olive green":"#a4be5c","brownish orange":"#cb7723","dark aqua":"#05696b","purplish pink":"#ce5dae","dark salmon":"#c85a53","greenish grey":"#96ae8d","jade":"#1fa774","ugly green":"#7a9703","dark beige":"#ac9362","emerald":"#01a049","pale red":"#d9544d","light magenta":"#fa5ff7","sky":"#82cafc","light cyan":"#acfffc","yellow orange":"#fcb001","reddish purple":"#910951","reddish pink":"#fe2c54","orchid":"#c875c4","dirty yellow":"#cdc50a","orange red":"#fd411e","deep red":"#9a0200","orange brown":"#be6400","cobalt blue":"#030aa7","neon pink":"#fe019a","rose pink":"#f7879a","greyish purple":"#887191","raspberry":"#b00149","aqua green":"#12e193","salmon pink":"#fe7b7c","tangerine":"#ff9408","brownish green":"#6a6e09","red brown":"#8b2e16","greenish brown":"#696112","pumpkin":"#e17701","pine green":"#0a481e","charcoal":"#343837","baby pink":"#ffb7ce","cornflower":"#6a79f7","blue violet":"#5d06e9","chocolate":"#3d1c02","greyish green":"#82a67d","scarlet":"#be0119","green yellow":"#c9ff27","dark olive":"#373e02","sienna":"#a9561e","pastel purple":"#caa0ff","terracotta":"#ca6641","aqua blue":"#02d8e9","sage green":"#88b378","blood red":"#980002","deep pink":"#cb0162","grass":"#5cac2d","moss":"#769958","pastel blue":"#a2bffe","bluish green":"#10a674","green blue":"#06b48b","dark tan":"#af884a","greenish blue":"#0b8b87","pale orange":"#ffa756","vomit":"#a2a415","forrest green":"#154406","dark lavender":"#856798","dark violet":"#34013f","purple blue":"#632de9","dark cyan":"#0a888a","olive drab":"#6f7632","pinkish":"#d46a7e","cobalt":"#1e488f","neon purple":"#bc13fe","light turquoise":"#7ef4cc","apple green":"#76cd26","dull green":"#74a662","wine":"#80013f","powder blue":"#b1d1fc","off white":"#ffffe4","electric blue":"#0652ff","dark turquoise":"#045c5a","blue purple":"#5729ce","azure":"#069af3","bright red":"#ff000d\n","pinkish red":"#f10c45","cornflower blue":"#5170d7","light olive":"#acbf69","grape":"#6c3461","greyish blue":"#5e819d","purplish blue":"#601ef9","yellowish green":"#b0dd16","greenish yellow":"#cdfd02","medium blue":"#2c6fbb","dusty rose":"#c0737a","light violet":"#d6b4fc","midnight blue":"#020035","bluish purple":"#703be7","red orange":"#fd3c06","dark magenta":"#960056","greenish":"#40a368","ocean blue":"#03719c","coral":"#fc5a50","cream":"#ffffc2","reddish brown":"#7f2b0a","burnt sienna":"#b04e0f","brick":"#a03623","sage":"#87ae73","grey green":"#789b73","white":"#ffffff","robin's egg blue":"#98eff9","moss green":"#658b38","steel blue":"#5a7d9a","eggplant":"#380835","light yellow":"#fffe7a","leaf green":"#5ca904","light grey":"#d8dcd6","puke":"#a5a502","pinkish purple":"#d648d7","sea blue":"#047495","pale purple":"#b790d4","slate blue":"#5b7c99","blue grey":"#607c8e","hunter green":"#0b4008","fuchsia":"#ed0dd9","crimson":"#8c000f","pale yellow":"#ffff84","ochre":"#bf9005","mustard yellow":"#d2bd0a","light red":"#ff474c","cerulean":"#0485d1","pale pink":"#ffcfdc","deep blue":"#040273","rust":"#a83c09","light teal":"#90e4c1","slate":"#516572","goldenrod":"#fac205","dark yellow":"#d5b60a","dark grey":"#363737","army green":"#4b5d16","grey blue":"#6b8ba4","seafoam":"#80f9ad","puce":"#a57e52","spring green":"#a9f971","dark orange":"#c65102","sand":"#e2ca76","pastel green":"#b0ff9d","mint":"#9ffeb0","light orange":"#fdaa48","bright pink":"#fe01b1","chartreuse":"#c1f80a","deep purple":"#36013f","dark brown":"#341c02","taupe":"#b9a281","pea green":"#8eab12","puke green":"#9aae07","kelly green":"#02ab2e","seafoam green":"#7af9ab","blue green":"#137e6d","khaki":"#aaa662","burgundy":"#610023","dark teal":"#014d4e","brick red":"#8f1402","royal purple":"#4b006e","plum":"#580f41","mint green":"#8fff9f","gold":"#dbb40c","baby blue":"#a2cffe","yellow green":"#c0fb2d","bright purple":"#be03fd","dark red":"#840000","pale blue":"#d0fefe","grass green":"#3f9b0b","navy":"#01153e","aquamarine":"#04d8b2","burnt orange":"#c04e01","neon green":"#0cff0c","bright blue":"#0165fc","rose":"#cf6275","light pink":"#ffd1df","mustard":"#ceb301","indigo":"#380282","lime":"#aaff32","sea green":"#53fca1","periwinkle":"#8e82fe","dark pink":"#cb416b","olive green":"#677a04","peach":"#ffb07c","pale green":"#c7fdb5","light brown":"#ad8150","hot pink":"#ff028d","black":"#000000","lilac":"#cea2fd","navy blue":"#001146","royal blue":"#0504aa","beige":"#e6daa6","salmon":"#ff796c","olive":"#6e750e","maroon":"#650021","bright green":"#01ff07","dark purple":"#35063e","mauve":"#ae7181","forest green":"#06470c","aqua":"#13eac9","cyan":"#00ffff","tan":"#d1b26f","dark blue":"#00035b","lavender":"#c79fef","turquoise":"#06c2ac","dark green":"#033500","violet":"#9a0eea","light purple":"#bf77f6","lime green":"#89fe05","grey":"#929591","sky blue":"#75bbfd","yellow":"#ffff14","magenta":"#c20078","light green":"#96f97b","orange":"#f97306","teal":"#029386","light blue":"#95d0fc","red":"#e50000","brown":"#653700","pink":"#ff81c0","blue":"#0343df","green":"#15b01a","purple":"#7e1e9c"}
data/gemspec.yml CHANGED
@@ -10,6 +10,8 @@ license: MIT
10
10
  authors: Damien Robert
11
11
  email: Damien.Olivier.Robert+gems@gmail.com
12
12
  homepage: https://github.com/DamienRobert/simplecolor
13
+ extra_files:
14
+ - data/rgb_colors.json.gz
13
15
 
14
16
  development_dependencies:
15
17
  minitest: "~> 5.0"
data/lib/simplecolor.rb CHANGED
@@ -4,178 +4,209 @@ require 'simplecolor/colors'
4
4
  #Usage:
5
5
  #
6
6
  #@example
7
- # class Foo
8
- # include SimpleColor::Mixin
9
- # def to_str
10
- # ...
11
- # end
12
- # end
13
- # foo=Foo.new()
14
- # foo.color(:red)
7
+ # class Foo
8
+ # include SimpleColor
9
+ # def to_str
10
+ # ...
11
+ # end
12
+ # end
13
+ # foo=Foo.new()
14
+ # foo.color(:red)
15
15
 
16
16
  #after SimpleColor.mix_in_string, one can do
17
17
  #`"blue".color(:blue,:bold)`
18
18
  module SimpleColor
19
- # The Colorer module handle all color outputs
20
- module Colorer
19
+ SimpleColorError=Class.new(StandardError)
20
+
21
+ require 'simplecolor/colorer'
22
+ require 'simplecolor/rgb'
23
+
24
+ # Wraps around Colorer to provide useful instance methods
25
+ module ColorWrapper
21
26
  extend self
22
- WrongColor=Class.new(StandardError)
23
- def color_attributes(*args, mode: :text)
24
- accu=[]
25
- buffer=""
26
- flush=lambda {r=accu.join(";"); accu=[]; r.empty? || r="\e["+r+"m"; buffer<<r}
27
- args.each do |col|
28
- case col
29
- when Symbol
30
- raise WrongColor.new(col) unless COLORS.key?(col)
31
- accu<<COLORS[col]
32
- when COLOR_REGEXP
33
- flush.call
34
- buffer<<col
27
+ # wrap self or the first argument with colors
28
+ # @example ploum
29
+ # SimpleColor.color("blue", :blue, :bold)
30
+ # SimpleColor.color(:blue,:bold) { "blue" }
31
+ # SimpleColor.color(:blue,:bold) << "blue" << SimpleColor.color(:clear)
32
+ %i(color uncolor color! uncolor! color?).each do |m|
33
+ define_method m do |*args, &b|
34
+ arg=if b
35
+ b.call.to_s
36
+ elsif respond_to?(:to_str)
37
+ self.to_str
35
38
  else
36
- raise WrongColor.new(col)
39
+ first=args.first
40
+ if first.respond_to?(:to_str)
41
+ args.shift.to_str
42
+ elsif first.nil?
43
+ args.shift
44
+ else
45
+ nil
46
+ end
47
+ end
48
+ case m
49
+ when :color
50
+ Colorer.colorer(arg.dup,*args)
51
+ when :uncolor
52
+ Colorer.uncolorer(arg.dup,*args)
53
+ when :color!
54
+ Colorer.colorer(arg,*args)
55
+ when :uncolor!
56
+ Colorer.uncolorer(arg,*args)
57
+ when :color?
58
+ Colorer.colored?(arg,*args)
37
59
  end
38
- end
39
- flush.call
40
- case mode
41
- when :shell
42
- "%{"+buffer+"%}"
43
- when :disabled
44
- ""
45
- else
46
- buffer
47
60
  end
48
61
  end
62
+ end
63
+
64
+ module Utilities
65
+ extend self
49
66
 
50
- def colorer(s,*attributes,**kwds)
51
- if s.nil?
52
- color_attributes(*attributes,**kwds)
53
- elsif s.empty?
54
- s
55
- else
56
- matched = s.match(COLORMATCH_REGEXP)
57
- attributes=color_attributes(*attributes,**kwds)
58
- s.insert(matched.end(0), attributes)
59
- s.concat(color_attributes(:clear,**kwds)) unless s =~ /#{CLEAR_REGEXP}$/ or attributes.empty?
60
- s
67
+ # scan s from left to right and for each ansi sequences found
68
+ # split it into elementary components and output the symbolic meaning
69
+ # eg: SimpleColor.attributes_from_colors(SimpleColor.color("foo", :red))
70
+ # => [:red, :reset]
71
+ def attributes_from_colors(s)
72
+ s.scan(Colorer.regexp(:ansi)).flat_map do |a|
73
+ next :reset if a=="\e[m" #alternative for reset
74
+ stack=[]
75
+ # a[/\e\[(.*)m/,1].split(';').map {|c| Colorer.colors.key(c.to_i)}
76
+ codes=a[/\e\[(.*)m/,1].split(';')
77
+ i=0; while i<codes.length do
78
+ c=codes[i]
79
+ if c=="38" or c=="48"
80
+ if codes[i+1]=="5" #256 colors
81
+ v=codes[i+2]
82
+ stack << RGB.new(v.to_i, mode: 256, background: c=="48")
83
+ i+=3
84
+ elsif codes[i+1]=="2" #true colors
85
+ r=codes[i+2].to_i; g=codes[i+3].to_i; b=codes[i+4].to_i
86
+ stack << RGB.new([r,g,b], background: c=="48")
87
+ i+=5
88
+ end
89
+ else
90
+ stack << Colorer.colors.key(c.to_i)
91
+ i+=1
92
+ end
93
+ end
94
+ stack
61
95
  end
62
96
  end
63
97
 
64
- def uncolorer(s)
65
- s.to_str.gsub!(COLOR_REGEXP, '') || s.to_str
98
+ #get the ansi sequences on s (assume the whole line is colored)
99
+ #returns left_ansi, right_ansi, string
100
+ def current_colors(s)
101
+ m=s.match(/^(#{Colorer.regexp(:match)})(.*?)(#{Colorer.regexp(:match)})$/)
102
+ [m[1],m[3],m[2]]
66
103
  rescue ArgumentError #rescue from "invalid byte sequence in UTF-8"
67
- s.to_str
104
+ ["","",s]
68
105
  end
69
-
70
- def colored?(s)
71
- !! (s =~ COLOR_REGEXP)
106
+ #copy the colors from s to t
107
+ def copy_colors(s,t)
108
+ b,e=current_colors(s)
109
+ b+t+e
72
110
  end
73
- end
74
-
75
- # Wraps around Colorer to provide useful instance methods
76
- module ColorWrapper
77
- extend self
78
111
 
79
- # Returns an uncolored version of the string, that is all
80
- # ANSI-sequences are stripped from the string.
81
- # @see: color
82
- def uncolor!(string = nil)
83
- arg=if block_given?
84
- yield.to_s
85
- elsif string.respond_to?(:to_str)
86
- string.to_str
87
- elsif respond_to?(:to_str)
88
- self.to_str
89
- else
90
- ''
91
- end
92
- Colorer.uncolorer(arg)
112
+ #split the line into characters and ANSII color sequences
113
+ def color_entities(l, color_regexp: Colorer.regexp(:color))
114
+ l.split(/(#{color_regexp})/).flat_map {|c| color?(c) ? [c] : c.split('') }
115
+ end
116
+ #same as above but split into strings
117
+ def color_strings(l, color_regexp: Colorer.regexp(:color))
118
+ u=l.split(/(#{color_regexp})/)
119
+ # if we start with an ANSI sequence, u is ["", ...], so we need to
120
+ # get rid of that ""
121
+ u.shift if u.first == ""
122
+ u
93
123
  end
94
124
 
95
- # wrap self or the first argument with colors
96
- # @example ploum
97
- # SimpleColor.color("blue", :blue, :bold)
98
- # SimpleColor.color(:blue,:bold) { "blue" }
99
- # SimpleColor.color(:blue,:bold) << "blue" << SimpleColor.color(:clear)
100
- def color!(*args)
101
- arg=if block_given?
102
- yield.to_s
103
- elsif respond_to?(:to_str)
104
- self.to_str
105
- elsif args.first.respond_to?(:to_str)
106
- args.shift.to_str
107
- else
108
- nil
109
- end
110
- Colorer.colorer(arg,*args)
125
+ def fill(s, columns:ENV['COLUMNS']&.to_i || 80)
126
+ r=s.each_line.map do |l|
127
+ l=l.chomp
128
+ length=uncolor(l).length
129
+ to_fill=columns - (length % columns)
130
+ to_fill = 0 if to_fill == columns
131
+ l+" "*to_fill
132
+ end.join("\n")
133
+ r+="\n" if s.end_with?("\n")
134
+ r
111
135
  end
112
136
 
113
- [:color,:uncolor].each do |m|
114
- define_method m do |*args,&b|
115
- self.dup.send :"#{m}!",*args,&b
116
- end
137
+ def clear
138
+ color(:clear)
117
139
  end
118
140
 
119
- def color?(*args)
120
- arg=if block_given?
121
- yield.to_s
122
- elsif respond_to?(:to_str)
123
- self.to_str
124
- elsif args.first.respond_to?(:to_str)
125
- args.shift.to_str
126
- else
127
- nil
128
- end
129
- Colorer.colored?(arg)
141
+ def [](*args)
142
+ color(*args)
130
143
  end
131
144
  end
132
145
 
133
- include ColorWrapper
134
- extend self
146
+ module Opts
147
+ extend self
135
148
 
136
- # enabled can be set to true, false, or :shell
137
- # :shell means that the color escape sequence will be quoted.
138
- # This is meant to be used in the shell prompt, so that the escape
139
- # sequence will not count in the length of the prompt.
140
- attr_accessor :enabled
141
- self.enabled=true
149
+ @default_abbreviations={}
150
+ @default_colornames={}
151
+ @default_opts={mode: true, color_mode: :truecolor, abbreviations: @default_abbreviations}
152
+ class << self
153
+ attr_reader :default_opts, :default_colornames
154
+ end
142
155
 
143
- [:color,:color!].each do |m|
144
- define_method m do |*args, mode: (SimpleColor.enabled || :disabled), &b|
145
- super(*args, mode: mode, &b)
156
+ attr_writer :opts
157
+ def opts
158
+ @opts ||= Opts.default_opts.clone
146
159
  end
147
- end
148
160
 
149
- module Helpers
150
- def mix_in(klass)
151
- klass.send :include, SimpleColor
161
+ # enabled can be set to true, false, or :shell
162
+ # :shell means that the color escape sequence will be quoted.
163
+ # This is meant to be used in the shell prompt, so that the escape
164
+ # sequence will not count in the length of the prompt.
165
+ opts_access={enabled: :mode}
166
+ %i(mode color_mode abbreviations).each do |opt|
167
+ opts_access[opt]=opt
152
168
  end
153
- def mix_in_string
154
- mix_in(String)
169
+ opts_access.each do |i,k|
170
+ define_method(i) do
171
+ opts[k]
172
+ end
173
+ define_method("#{i}=".to_sym) do |v|
174
+ opts[k]=v
175
+ end
155
176
  end
177
+ end
156
178
 
157
- def attributes_from_colors(s)
158
- s.scan(/#{ANSICOLOR_REGEXP}/).flat_map do |a|
159
- next :reset if a=="\e[m"
160
- a[/\e\[(.*)m/,1].split(';').map {|c| COLORS.key(c.to_i)}
179
+ module Mixin
180
+ def self.define_color_methods(klass, *methods, opts_from: nil, color_module: ColorWrapper)
181
+ methods=color_module.instance_methods if methods.empty?
182
+ methods.each do |m|
183
+ klass.define_method m do |*args, **l_opts, &b|
184
+ opts= opts_from ? opts_from.opts : self.opts
185
+ opts=opts.merge(l_opts)
186
+ color_module.instance_method(m).bind(self).call(*args, **opts, &b)
187
+ end
161
188
  end
162
189
  end
163
- #get the ansi sequences on s (assume the whole line is colored)
164
- def current_colors(s)
165
- m=s.match(/^(#{COLORMATCH_REGEXP})(.*?)(#{COLORMATCH_REGEXP})$/)
166
- [m[1],m[3],m[2]]
167
- rescue ArgumentError #rescue from "invalid byte sequence in UTF-8"
168
- ["","",s]
190
+
191
+ def mixin(*methods)
192
+ klass=self
193
+ Module.new do
194
+ Mixin.define_color_methods(self, *methods, opts_from: klass)
195
+ end
169
196
  end
170
- #copy the colors from s to t
171
- def copy_colors(s,t)
172
- b,e=current_colors(s)
173
- b+t+e
197
+
198
+ def mix_in(klass)
199
+ klass.send :include, mixin
174
200
  end
175
- #split the line into characters and ANSII color sequences
176
- def color_entities(l)
177
- l.split(/(#{COLOR_REGEXP})/).flat_map {|c| color?(c) ? [c] : c.split('') }
201
+ def mix_in_string
202
+ mix_in(String)
178
203
  end
179
204
  end
180
- extend Helpers
205
+
206
+ include Utilities
207
+ include Opts
208
+ include Mixin
209
+ extend self
210
+
211
+ Mixin.define_color_methods(self)
181
212
  end