autocolors 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/notes ADDED
@@ -0,0 +1,309 @@
1
+
2
+ common approaches:
3
+ - type distance
4
+ - semantic functionality distance
5
+ - semantic importance distance / very primitive developer need measurement
6
+ - syntactic distance
7
+
8
+
9
+ - author vs. maintainer vs. reviewer vs. contributor ...
10
+ - density / levels of distinction /
11
+ - structural vs. contextual (likelihood that, for example, you'll find it at the
12
+ beginning of a line with aligned indentation)
13
+ - discriminant vs. qualifier/attribute (the first- unique names- being more important to stand out)
14
+
15
+
16
+ static function blahblah
17
+ ^ ^ ^
18
+ | | +- discriminant
19
+ | +---------- structural
20
+ +----------------- qualifier/attribute
21
+
22
+
23
+ create monotone bases
24
+ +----------+---------------------+-------------------+
25
+ | name | light-scheme | dark-scheme |
26
+ +----------+---------------------+-------------------+
27
+ | light_3 | background | |-\
28
+ | light_2 | background-emph | | |
29
+ | light_1 | content-minor | content-emph | |-----
30
+ | light_0 | | content |--|\
31
+ | dark__0 | content | |-/ |
32
+ | dark__1 | content-emph | content-minor | |---
33
+ | dark__2 | | background-emph | |
34
+ | dark__3 | | background |---/
35
+
36
+
37
+ ===============================================================================
38
+
39
+ * Embedded lang1
40
+ * Embedded lang2
41
+
42
+
43
+
44
+ palette
45
+ clear/bold/faint/under/blink/reverse/conceal
46
+ fg|bg|
47
+
48
+ +-----------+--------------+--------+-----------------------
49
+ | version | palette | styles | comments
50
+ +-----------+--------------+--------+-----------------------
51
+ | mono | 2/2/7 |
52
+
53
+
54
+
55
+ Terminal support for some ansi styling- from http://perldoc.perl.org/Term/ANSIColor.html , which
56
+ gives credit to Jean Delvare.
57
+ +--------------+----------+---------+----------+----------+-------------+------------+------------+
58
+ | | clear | bold | faint | under | blink | reverse | conceal |
59
+ +--------------+----------+---------+----------+----------+-------------+------------+------------+
60
+ | xterm | yes | yes | no | yes | yes | yes | yes |
61
+ | linux | yes | yes | yes | bold | yes | yes | no |
62
+ | rxvt | yes | yes | no | yes | bold/black | yes | no |
63
+ | dtterm | yes | yes | yes | yes | reverse | yes | yes |
64
+ | teraterm | yes | reverse | no | yes | rev/red | yes | no |
65
+ | aixterm | kinda | normal | no | yes | no | yes | yes |
66
+ | PuTTY | yes | color | no | yes | no | yes | no |
67
+ | Windows | yes | no | no | no | no | yes | no |
68
+ | Cygwin SSH | yes | yes | no | color | color | color | yes |
69
+ | Mac Terminal | yes | yes | no | yes | yes | yes | yes |
70
+ | gvim | "NONE" | bold | italic | underline| standout | rev/inv | ? |
71
+
72
+ "Windows is Windows telnet, Cygwin SSH is the OpenSSH implementation under
73
+ Cygwin on Windows NT, and Mac Terminal is the Terminal application in Mac OS X.
74
+ Where the entry is other than yes or no, that emulator displays the given
75
+ attribute as something else instead. Note that on an aixterm, clear doesn't
76
+ reset colors; you have to explicitly set the colors back to what you want. More
77
+ entries in this table are welcome.
78
+
79
+ Note that codes 3 (italic), 6 (rapid blink), and 9 (strike-through) are
80
+ specified in ANSI X3.64 and ECMA-048 but are not commonly supported by most
81
+ displays and emulators and therefore aren't supported by this module at the
82
+ present time. ECMA-048 also specifies a large number of other attributes,
83
+ including a sequence of attributes for font changes, Fraktur characters,
84
+ double-underlining, framing, circling, and overlining. As none of these
85
+ attributes are widely supported or useful, they also aren't currently supported
86
+ by this module."
87
+
88
+ vim support for term:
89
+ bold
90
+ underline
91
+ undercurl not always available (usually avail in gui for mispells etc.)
92
+ reverse
93
+ inverse same as reverse
94
+ italic
95
+ standout
96
+ NONE no attributes used (used to reset it)
97
+
98
+ Normal: N
99
+ Bold: B
100
+ Underline: U
101
+ Italic: I
102
+ Strike: X
103
+ Invis: V
104
+ Reverse: R
105
+ Standout: A
106
+
107
+ ----------------------+-----------------+----------+---------+---------------------------+------------
108
+ (Name/Desc) | vim | pygments | perldoc | emacs | textmate
109
+ ----------------------+-----------------+----------+---------+---------------------------+-----------
110
+ quote | -- | | q
111
+
112
+ delims.heredoc target | -- | -- | h |
113
+
114
+ keyword.constant | *Constant | kc | -- | constant-face
115
+ name.constant | -- | no | -- |
116
+
117
+ literal.number | Number | m | n |
118
+ literal.boolean | Boolean | -- | -- |
119
+ literal.number.float | Float | mf | -- |
120
+ literal.number.hex | -- | mh | -- |
121
+ literal.number.oct | -- | mo | -- |
122
+ literal.number.integer| -- | mi | -- |
123
+ literal.num.int.long | -- | il | -- |
124
+ |
125
+ name.variable | *Identifier | nv | i | variable-name-face
126
+ reference | -- | -- | -- | reference-face
127
+ name.variable.class | -- | vc | -- |
128
+ name.variable.global | -- | vg | -- |
129
+ name.variable.instance| -- | vi | -- |
130
+ name.function | Function | nf | -- | function-name-face
131
+ subroutine | -- | -- | m |
132
+ support function | -- | supportf.| -- |
133
+ name.attribute | -- | na | -- |
134
+ name.builtin | -- | nb | -- | builtin-face
135
+ name.builtin.pseudo | -- | bp | -- |
136
+ keyword.declaration | *Statement | kd | -- |
137
+ conditional | Conditional | -- | -- |
138
+ repeat | Repeat | -- | -- |
139
+ label/string.symbol | Label | ss | j |
140
+ operator | Operator | o | -- |
141
+ operator.word | -- | ow | -- |
142
+ name.decorator | -- | nd | -- |
143
+ keyword | Keyword | k | k | keyword-face
144
+ keyword.namespace | -- | kn | -- |
145
+ name.namespace | -- | nn | -- |
146
+ keyword.pseudo | -- | kp | -- |
147
+ keyword.reserved | -- | kr | -- |
148
+ preprocessor stmt | *PreProc | cp | -- | preprocessor-face
149
+ include/require | Include | -- | -- |
150
+ | Define
151
+ | Macro
152
+ | PreCondit
153
+ |
154
+ keyword.type | *Type | kt | -- | type-face
155
+ name.class | StorageClass | nc | -- |
156
+ structure | Structure | | s
157
+ | Typedef
158
+ | --
159
+ | *Special
160
+ name.tag | Tag | nt | -- |
161
+ punctuation/delim | Delimiter | | pu
162
+ comma | -- | | cm
163
+ colon | -- | | co
164
+ semicolon | -- | | sc
165
+ paren | -- | | p
166
+ matching paren | MatchParen | |
167
+ caret | -- | caret |
168
+ negation chars | -- | -- | -- | negation-char-face
169
+ debug statement | Debug
170
+ |
171
+ underlined | *Underlined
172
+ |
173
+ |
174
+ warnings | -- | -- | -- | warning-face
175
+ error | *Error | err | -- | c-invalid-face
176
+ name.exception | Exception | ne | -- |
177
+ |
178
+ |
179
+ selection | Visual | selection| -- | region
180
+ cursor | Cursor | |
181
+ cursor line | CursorLine | |
182
+ cursor column | CursorColumn | |
183
+ p menu (?) | Pmenu | |
184
+ pmenu Selection | PmenuSel | |
185
+ line numbers | LineNr | |
186
+ statusline | StatusLine | | | mode-line
187
+ statusline nc (?) | StatusLineNC | |
188
+ verticalsplit | VertSplit | |
189
+ fold | Folded | |
190
+ title | Title | |
191
+ special key | SpecialKey | |
192
+ diff change | DiffChange
193
+ diff add | DiffAdd
194
+ diff text | DiffText
195
+ diff delete | DiffDelete
196
+ tab line fill | TabLineFill
197
+ tab line selection | TabLineSel
198
+ generic.prompt | -- | gp | -- | -- |
199
+
200
+
201
+ More:
202
+ textmate (finish) http://manual.macromates.com/en/language_grammars#naming_conventions.html
203
+ notepad++ http://panofish.net/pics/userDefineLang.xml
204
+ SED http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=224571
205
+ Visual Studio http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=224571
206
+ eclipse http://eclipsecolorthemes.jottit.com/
207
+ redcar (Uses textmate themes)
208
+ JEdit, Kate/KWrite https://github.com/sickill/coloration/
209
+
210
+ | fg | bg | txt | examples
211
+ -----------------------------------------------------------------
212
+ | 16 | 16 | bold/underline/blink/invisible |
213
+ | 88 | 88 | bold/underline/blink/invisible
214
+ 256
215
+
216
+
217
+
218
+
219
+
220
+
221
+ background color luminance probability
222
+ |
223
+ |
224
+ |-- --
225
+ | \ /
226
+ | \ /
227
+ | \ /
228
+ +--------------
229
+ drk lght
230
+
231
+
232
+
233
+
234
+
235
+
236
+ # | part | textmate | vim | emacs
237
+ ----+-------------------+----------------------------+---------------------+------------------------------
238
+ 0a | text (normal) | entity/markup | Normal/NonText | face (?)
239
+ 0b | invalid | invalid | Error | warning-face/c-invalid-face
240
+
241
+ 1 | comment | comment | Comment | comment-face
242
+ 2 | string | string | String | string-face
243
+ 3 | keyword | keyword | Statement/Keyword | keyword-face/builtin-face
244
+ 4 | preprocessor | comment.block.preprocessor | PreProc | preprocessor-face
245
+ 5 | variable | variable | Identifier | variable-name-face
246
+ 6 | function | entity | Identifier/Function | function-name-face
247
+ 7 | constant | constant | Constant | constant-face
248
+ 8 | type | storage | Type | type-face
249
+
250
+ 0c | ui-component | (n/a) | (lots) | region/mode-line
251
+
252
+
253
+ textmate: support
254
+ vim: Ignore, Todo, Special
255
+ emacs: doc-face/doc-string-face, reference-face, negation-char-face
256
+
257
+
258
+ 1 -> 25%
259
+ 2 -> 40%-60%
260
+ 3 -> 40%-60%
261
+ 4 -> 40%-60%
262
+ 5 -> 40%-60%
263
+ 6 -> 40%-60%
264
+ 7 -> 40%-60%
265
+ 8 -> 40%-60%
266
+
267
+ 0b-> 40%-60%
268
+ 0a-> 50%
269
+
270
+ ===== Color -> Monochrome/Term ======
271
+
272
+ More diff + much lower CR ^ conceal
273
+ less diff + lower CR | faint/italic
274
+ base o clear/NONE
275
+ Less diff | bold
276
+ | underline
277
+ | reverse/inverse
278
+ More diff v standout/blink
279
+
280
+
281
+
282
+ Syntax richness | Color richness
283
+
284
+ base | mono
285
+ base | 16
286
+ base | 256
287
+ base | high
288
+
289
+ high | mono
290
+ high | 16
291
+ high | 256
292
+ high | high
293
+
294
+
295
+
296
+
297
+ base background - somewhat near black or white
298
+ base foreground - somewhat near a 16-color value
299
+
300
+ core-8 - somewhat near main 8-color values, for 1-8 syntax parts
301
+ core-
302
+
303
+
304
+ a hilight-section for each of t_Co in 8 / 16 / 88 / 256 / gui
305
+
306
+ hi Normal / and then
307
+ hi MainPart term=... cterm=... gui=... ctermfg=... ctermbg=... guifg=... guibg=...
308
+
309
+
data/test/helper.rb ADDED
@@ -0,0 +1,19 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'minitest/unit'
11
+
12
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
13
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
+ require 'autocolors'
15
+
16
+ class MiniTest::Unit::TestCase
17
+ end
18
+
19
+ MiniTest::Unit.autorun
data/test/swatch.erb ADDED
@@ -0,0 +1,19 @@
1
+ <style type="text/css">
2
+ div { padding: 30px; margin: 30px;}
3
+ p { font-family: Helvetica; font-size: 22pt; }
4
+ </style>
5
+ <% schemes.each do |cscheme| %>
6
+ <style type="text/css">
7
+ .scheme-<%= cscheme.name %> {
8
+ background-color: <%= cscheme[:light][:normal][:bg] %>;
9
+ color: <%= cscheme[:light][:normal][:fg] %>;
10
+ }
11
+ .dscheme-<%= cscheme.name %> {
12
+ background-color: <%= cscheme[:dark][:normal][:bg]%>;
13
+ color: <%= cscheme[:dark][:normal][:fg]%>;
14
+ }
15
+ </style>
16
+ <div class="scheme-<%= cscheme.name %>">[<%= cscheme[:light][:normal][:bg]%>] <%= cscheme.name %></div>
17
+ <div class="dscheme-<%= cscheme.name %>">[<%= cscheme[:light][:normal][:fg]%>] <%= cscheme.name %></div>
18
+ <% end %>
19
+
@@ -0,0 +1,7 @@
1
+ require 'helper'
2
+
3
+ class TestAutocolors < MiniTest::Unit::TestCase
4
+ def test_something_for_real
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,190 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: autocolors
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Joseph Wecker
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-09-10 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: webster
16
+ requirement: &2158271400 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *2158271400
25
+ - !ruby/object:Gem::Dependency
26
+ name: minitest
27
+ requirement: &2158270800 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *2158270800
36
+ - !ruby/object:Gem::Dependency
37
+ name: yard
38
+ requirement: &2158270260 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 0.6.0
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *2158270260
47
+ - !ruby/object:Gem::Dependency
48
+ name: bundler
49
+ requirement: &2158269560 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 1.0.0
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *2158269560
58
+ - !ruby/object:Gem::Dependency
59
+ name: jeweler
60
+ requirement: &2158268760 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ~>
64
+ - !ruby/object:Gem::Version
65
+ version: 1.6.4
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: *2158268760
69
+ - !ruby/object:Gem::Dependency
70
+ name: rcov
71
+ requirement: &2158256880 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: *2158256880
80
+ - !ruby/object:Gem::Dependency
81
+ name: reek
82
+ requirement: &2158256340 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ~>
86
+ - !ruby/object:Gem::Version
87
+ version: 1.2.8
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: *2158256340
91
+ - !ruby/object:Gem::Dependency
92
+ name: roodi
93
+ requirement: &2158255820 !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ~>
97
+ - !ruby/object:Gem::Version
98
+ version: 2.1.0
99
+ type: :development
100
+ prerelease: false
101
+ version_requirements: *2158255820
102
+ - !ruby/object:Gem::Dependency
103
+ name: bluecloth
104
+ requirement: &2158255240 !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: *2158255240
113
+ description: Inspired by solarized, and lots of work with various colorschemes and
114
+ syntax highlight files, and driven by a need to have some color variety that doesn't
115
+ stink. Tries to generate colorschemes with just the right contrast, variety, and
116
+ coherence.
117
+ email: joseph.wecker@gmail.com
118
+ executables: []
119
+ extensions: []
120
+ extra_rdoc_files:
121
+ - LICENSE.txt
122
+ - README.md
123
+ files:
124
+ - .attic/colors.rb
125
+ - .attic/colorscheme.rb
126
+ - .attic/labtest.rb
127
+ - .attic/sw2.erb
128
+ - .attic/swatch.erb
129
+ - .attic/swatch3.erb
130
+ - .attic/test_swatch.rb
131
+ - .attic/test_swatch2.rb
132
+ - .yardopts
133
+ - Gemfile
134
+ - Gemfile.lock
135
+ - LICENSE.txt
136
+ - README.md
137
+ - Rakefile
138
+ - VERSION
139
+ - analysis/textmate/textmate-in-the-wild.txt
140
+ - analysis/vim/analyze-commonly-colored.sh
141
+ - analysis/vim/analyze-mappings.rb
142
+ - analysis/vim/common-mappings.list
143
+ - analysis/vim/commonly-colored.list
144
+ - analysis/vim/gather.sh
145
+ - analysis/vim/statements.list
146
+ - autocolors.gemspec
147
+ - format-samples/1/Sweyla866607.css
148
+ - format-samples/1/Sweyla866607.tmTheme
149
+ - format-samples/1/Sweyla866607.txt
150
+ - format-samples/1/sweyla866607.el
151
+ - format-samples/1/sweyla866607.vim
152
+ - lib/VERSION
153
+ - lib/autocolors.rb
154
+ - lib/autocolors/colors.rb
155
+ - lib/autocolors/colorschemes.rb
156
+ - lib/autocolors/mapping.udon
157
+ - lib/autocolors/templates/colorscheme.vim
158
+ - notes
159
+ - test/helper.rb
160
+ - test/swatch.erb
161
+ - test/test_autocolors.rb
162
+ homepage: http://github.com/josephwecker/autocolors
163
+ licenses:
164
+ - MIT
165
+ post_install_message:
166
+ rdoc_options: []
167
+ require_paths:
168
+ - lib
169
+ required_ruby_version: !ruby/object:Gem::Requirement
170
+ none: false
171
+ requirements:
172
+ - - ! '>='
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ segments:
176
+ - 0
177
+ hash: -132573536749491889
178
+ required_rubygems_version: !ruby/object:Gem::Requirement
179
+ none: false
180
+ requirements:
181
+ - - ! '>='
182
+ - !ruby/object:Gem::Version
183
+ version: '0'
184
+ requirements: []
185
+ rubyforge_project:
186
+ rubygems_version: 1.8.10
187
+ signing_key:
188
+ specification_version: 3
189
+ summary: Automatically generates colorschemes (mostly for editors).
190
+ test_files: []