coloration 0.3.2 → 0.3.3

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.
@@ -19,7 +19,9 @@ module Coloration
19
19
  self.ui = settings.delete_at(0)["settings"]
20
20
  bg = Color::RGB.from_html(ui["background"][0..6])
21
21
  ui.each do |key, value|
22
- ui[key] = Color::RGBA.from_html(value, bg)
22
+ if value.start_with?("#")
23
+ ui[key] = Color::RGBA.from_html(value, bg)
24
+ end
23
25
  end
24
26
  ui["background"] = bg
25
27
 
@@ -1,3 +1,3 @@
1
1
  module Coloration
2
- VERSION = "0.3.2".freeze
2
+ VERSION = "0.3.3".freeze
3
3
  end
@@ -23,25 +23,24 @@ module Coloration
23
23
  add_line
24
24
 
25
25
  default_style = Style.new(:fg => @ui["foreground"])
26
- search_style = @items["variable"] || @items["entity"] || @items["keyword"] || default_style
27
26
  border_color = @ui["background"].mix_with(@ui["foreground"], 71)
28
27
  bg_line_color = @ui["background"].mix_with(@ui["foreground"], 90)
29
28
 
30
29
  ui_mapping = {
31
- "Cursor" => Style.new(:bg => @ui["caret"]),
30
+ "Cursor" => Style.new(:fg => @ui['background'], :bg => @ui["caret"]),
32
31
  "Visual" => Style.new(:bg => @ui["selection"]),
33
32
  "CursorLine" => Style.new(:bg => bg_line_color),
34
33
  "CursorColumn" => Style.new(:bg => bg_line_color),
35
34
  "ColorColumn" => Style.new(:bg => bg_line_color),
36
35
  "LineNr" => Style.new(:fg => @ui["foreground"].mix_with(@ui["background"], 50), :bg => bg_line_color),
37
36
  "VertSplit" => Style.new(:fg => border_color, :bg => border_color),
38
- "MatchParen" => @items["keyword"],
37
+ "MatchParen" => Style.new(:fg => @items["keyword"].foreground, :underline => true),
39
38
  "StatusLine" => Style.new(:fg => @ui["foreground"], :bg => border_color, :bold => true),
40
39
  "StatusLineNC" => Style.new(:fg => @ui["foreground"], :bg => border_color),
41
40
  "Pmenu" => "entity.name",
42
41
  "PmenuSel" => Style.new(:bg => @ui["selection"]),
43
- "IncSearch" => Style.new(:bg => search_style.foreground.mix_with(@ui["background"], 33)),
44
- "Search" => Style.new(:bg => search_style.foreground.mix_with(@ui["background"], 33)),
42
+ "IncSearch" => Style.new(:bg => @items['string'].foreground, :fg => @ui['background']),
43
+ "Search" => Style.new(:underline => true),
45
44
  "Directory" => "constant.other.symbol",
46
45
  "Folded" => Style.new(:fg => @items["comment"].try(:foreground), :bg => @ui["background"]),
47
46
  }
@@ -52,6 +51,19 @@ module Coloration
52
51
 
53
52
  add_line
54
53
 
54
+ bg_brightness = @ui["background"].brightness
55
+ if bg_brightness >= 0.5
56
+ # from Tango palette, lighter
57
+ red = Color::RGB.from_html '#ef2929'
58
+ green = Color::RGB.from_html '#8ae234'
59
+ blue = Color::RGB.from_html '#729fcf'
60
+ else
61
+ # from Tango palette, darker
62
+ red = Color::RGB.from_html '#a40000'
63
+ green = Color::RGB.from_html '#4e9a06'
64
+ blue = Color::RGB.from_html '#204a87'
65
+ end
66
+
55
67
  items_mapping = {
56
68
  # general colors for all languages
57
69
  "Normal" => Style.new(:fg => @ui["foreground"], :bg => @ui["background"]),
@@ -63,6 +75,10 @@ module Coloration
63
75
  #"Debug" => [],
64
76
  "Define" => "keyword",
65
77
  #"Delimiter" => "meta.separator",
78
+ "DiffAdd" => Style.new(:bg => green.mix_with(@ui['background'], 80), :fg => @ui['foreground'], :bold => true),
79
+ "DiffDelete" => Style.new(:fg => red.mix_with(@ui['background'], 80)),
80
+ "DiffChange" => Style.new(:bg => blue.mix_with(@ui['background'], 50), :fg => @ui['foreground']),
81
+ "DiffText" => Style.new(:bg => blue.mix_with(@ui['background'], 100), :fg => @ui['foreground'], :bold => true),
66
82
  "ErrorMsg" => "invalid",
67
83
  "WarningMsg" => "invalid",
68
84
  #"Exception" => [],
metadata CHANGED
@@ -1,77 +1,90 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coloration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
5
4
  prerelease:
5
+ version: 0.3.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Marcin Kulik
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-22 00:00:00.000000000 +02:00
13
- default_executable:
12
+ date: 2013-03-13 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
- name: textpow19
17
- requirement: &70471280 !ruby/object:Gem::Requirement
15
+ type: :runtime
16
+ requirement: !ruby/object:Gem::Requirement
18
17
  none: false
19
18
  requirements:
20
19
  - - ! '>='
21
20
  - !ruby/object:Gem::Version
22
21
  version: '0.11'
23
- type: :runtime
24
22
  prerelease: false
25
- version_requirements: *70471280
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ! '>='
27
+ - !ruby/object:Gem::Version
28
+ version: '0.11'
29
+ name: textpow19
26
30
  - !ruby/object:Gem::Dependency
27
- name: color-tools
28
- requirement: &70471050 !ruby/object:Gem::Requirement
31
+ type: :runtime
32
+ requirement: !ruby/object:Gem::Requirement
29
33
  none: false
30
34
  requirements:
31
35
  - - ! '>='
32
36
  - !ruby/object:Gem::Version
33
37
  version: 1.3.0
34
- type: :runtime
35
38
  prerelease: false
36
- version_requirements: *70471050
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: 1.3.0
45
+ name: color-tools
37
46
  - !ruby/object:Gem::Dependency
38
- name: plist
39
- requirement: &70470820 !ruby/object:Gem::Requirement
47
+ type: :runtime
48
+ requirement: !ruby/object:Gem::Requirement
40
49
  none: false
41
50
  requirements:
42
51
  - - ! '>='
43
52
  - !ruby/object:Gem::Version
44
53
  version: 3.1.0
45
- type: :runtime
46
54
  prerelease: false
47
- version_requirements: *70470820
55
+ version_requirements: !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ! '>='
59
+ - !ruby/object:Gem::Version
60
+ version: 3.1.0
61
+ name: plist
48
62
  description: Color scheme converters for vim, textmate, kate/kwrite, jedit
49
63
  email: marcin.kulik@gmail.com
50
64
  executables:
51
- - tm2vim
52
65
  - tm2katepart
66
+ - tm2vim
53
67
  - tm2jedit
54
68
  extensions: []
55
69
  extra_rdoc_files: []
56
70
  files:
57
- - bin/tm2vim
58
71
  - bin/tm2katepart
72
+ - bin/tm2vim
59
73
  - bin/tm2jedit
60
- - lib/coloration/extensions.rb
74
+ - lib/coloration.rb
75
+ - lib/coloration/version.rb
61
76
  - lib/coloration/readers/textmate_theme_reader.rb
62
- - lib/coloration/converters/textmate2katepart.rb
77
+ - lib/coloration/extensions.rb
78
+ - lib/coloration/style.rb
79
+ - lib/coloration/color_rgba.rb
63
80
  - lib/coloration/converters/textmate2vim.rb
64
81
  - lib/coloration/converters/textmate2jedit.rb
82
+ - lib/coloration/converters/textmate2katepart.rb
83
+ - lib/coloration/abstract_converter.rb
65
84
  - lib/coloration/writers/katepart_theme_writer.rb
66
- - lib/coloration/writers/vim_theme_writer.rb
67
85
  - lib/coloration/writers/jedit_theme_writer.rb
68
- - lib/coloration/abstract_converter.rb
69
- - lib/coloration/version.rb
70
- - lib/coloration/color_rgba.rb
71
- - lib/coloration/style.rb
72
- - lib/coloration.rb
86
+ - lib/coloration/writers/vim_theme_writer.rb
73
87
  - README.md
74
- has_rdoc: true
75
88
  homepage: http://github.com/sickill/coloration
76
89
  licenses: []
77
90
  post_install_message:
@@ -92,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
105
  version: '0'
93
106
  requirements: []
94
107
  rubyforge_project:
95
- rubygems_version: 1.6.2
108
+ rubygems_version: 1.8.24
96
109
  signing_key:
97
110
  specification_version: 3
98
111
  summary: Color scheme converters for vim, textmate, kate/kwrite, jedit