color 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/History.txt +5 -3
- data/Install.txt +1 -3
- data/Licence.txt +1 -3
- data/Manifest.txt +1 -1
- data/{Readme.txt → README.txt} +4 -5
- data/Rakefile +18 -18
- data/lib/color.rb +5 -7
- data/lib/color/cmyk.rb +2 -4
- data/lib/color/css.rb +2 -4
- data/lib/color/grayscale.rb +2 -4
- data/lib/color/hsl.rb +2 -4
- data/lib/color/palette.rb +2 -4
- data/lib/color/palette/adobecolor.rb +2 -4
- data/lib/color/palette/gimp.rb +2 -4
- data/lib/color/palette/monocontrast.rb +2 -4
- data/lib/color/rgb-colors.rb +2 -4
- data/lib/color/rgb.rb +2 -4
- data/lib/color/rgb/metallic.rb +2 -4
- data/lib/color/yiq.rb +2 -4
- data/test/test_adobecolor.rb +2 -4
- data/test/test_all.rb +2 -4
- data/test/test_cmyk.rb +2 -4
- data/test/test_color.rb +11 -4
- data/test/test_css.rb +2 -4
- data/test/test_gimp.rb +2 -4
- data/test/test_grayscale.rb +2 -4
- data/test/test_hsl.rb +3 -5
- data/test/test_monocontrast.rb +2 -4
- data/test/test_rgb.rb +3 -5
- data/test/test_yiq.rb +2 -4
- metadata +106 -58
- metadata.gz.sig +3 -3
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
== Color 1.4.1 / 2010.02.03
|
2
|
+
* Imported to github.
|
3
|
+
* Converted to Hoe 2.5 spec format.
|
4
|
+
|
1
5
|
== Color 1.4.0 / 2007.02.11
|
2
6
|
* Merged Austin Ziegler's color-tools library (previously part of the Ruby
|
3
7
|
PDF Tools project) with Matt Lyon's color library.
|
@@ -86,6 +90,4 @@
|
|
86
90
|
Licensed under a MIT-style licence. See Licence.txt in the main
|
87
91
|
distribution for full licensing information.
|
88
92
|
|
89
|
-
Copyright (c) 2005 -
|
90
|
-
|
91
|
-
$Id: History.txt 50 2007-02-03 20:26:19Z austin $
|
93
|
+
Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
data/Install.txt
CHANGED
@@ -15,6 +15,4 @@ sources.
|
|
15
15
|
Licensed under a MIT-style licence. See Licence.txt in the main
|
16
16
|
distribution for full licensing information.
|
17
17
|
|
18
|
-
Copyright (c) 2005 -
|
19
|
-
|
20
|
-
$Id: History.txt 50 2007-02-03 20:26:19Z austin $
|
18
|
+
Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
data/Licence.txt
CHANGED
@@ -2,7 +2,7 @@ Color
|
|
2
2
|
Colour management in Ruby
|
3
3
|
http://rubyforge.org/projects/color/
|
4
4
|
|
5
|
-
Copyright (c) 2005 -
|
5
|
+
Copyright (c) 2005 - 2010 Austin Ziegler, Matt Lyon, and other contributors
|
6
6
|
|
7
7
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
8
8
|
this software and associated documentation files (the "Software"), to deal in
|
@@ -25,5 +25,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
25
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
26
26
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
27
27
|
SOFTWARE.
|
28
|
-
|
29
|
-
$Id: History.txt 50 2007-02-03 20:26:19Z austin $
|
data/Manifest.txt
CHANGED
data/{Readme.txt → README.txt}
RENAMED
@@ -15,10 +15,11 @@ L*a*b*, XYZ) to non-absolute colour spaces (like RGB).
|
|
15
15
|
|
16
16
|
Color version 1.4 is the result of a project merge between color.rb 0.1.0 by
|
17
17
|
Matt Lyon and color-tools 1.3 by Austin Ziegler. Please see History.txt for
|
18
|
-
details on the changes this merge brings.
|
18
|
+
details on the changes this merge brings. Color version 1.4.1 changes
|
19
|
+
development to GitHub and fixes some small problems.
|
19
20
|
|
20
|
-
Copyright:: Copyright (c) 2005 -
|
21
|
-
Version:: 1.4.
|
21
|
+
Copyright:: Copyright (c) 2005 - 2010 by Austin Ziegler and Matt Lyon
|
22
|
+
Version:: 1.4.1
|
22
23
|
Homepage:: http://rubyforge.org/projects/color/
|
23
24
|
Licence:: MIT-Style; see Licence.txt
|
24
25
|
|
@@ -29,5 +30,3 @@ by Patrick Fitzgerald of BarelyFitz[3] in PHP.
|
|
29
30
|
[1] http://www.stuffandnonsense.co.uk/archives/creating_colour_palettes.html
|
30
31
|
[2] http://slayeroffice.com/tools/color_palette/
|
31
32
|
[3] http://www.barelyfitz.com/projects/csscolor/
|
32
|
-
|
33
|
-
$Id: Readme.txt 50 2007-02-03 20:26:19Z austin $
|
data/Rakefile
CHANGED
@@ -7,9 +7,7 @@
|
|
7
7
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
8
8
|
# distribution for full licensing information.
|
9
9
|
#
|
10
|
-
# Copyright (c) 2005 -
|
11
|
-
#
|
12
|
-
# $Id: History.txt 50 2007-02-03 20:26:19Z austin $
|
10
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
13
11
|
#++
|
14
12
|
|
15
13
|
require 'rubygems'
|
@@ -25,25 +23,25 @@ PKG_DIST = "#{PKG_NAME}-#{PKG_VERSION}"
|
|
25
23
|
PKG_TAR = "pkg/#{PKG_DIST}.tar.gz"
|
26
24
|
MANIFEST = File.read("Manifest.txt").split
|
27
25
|
|
28
|
-
Hoe.
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
26
|
+
Hoe.spec PKG_NAME do
|
27
|
+
self.version = PKG_VERSION
|
28
|
+
|
29
|
+
# self.rubyforge_name = PKG_NAME
|
30
|
+
|
31
|
+
developer "Austin Ziegler", "austin@rubyforge.org"
|
32
|
+
developer "Matt Lyon", "matt@postsomnia.com"
|
33
33
|
|
34
|
-
|
35
|
-
p.email = %W(austin@rubyforge.org matt@postsomnia.com)
|
36
|
-
p.url = "http://color.rubyforge.org/"
|
37
|
-
p.summary = "Colour management with Ruby"
|
38
|
-
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
39
|
-
p.description = p.paragraphs_of("Readme.txt", 1..1).join("\n\n")
|
34
|
+
self.url = %W(http://color.rubyforge.org/ http://github.com/halostatue/color)
|
40
35
|
|
41
|
-
|
36
|
+
self.summary = "Colour management with Ruby"
|
37
|
+
self.changes = paragraphs_of("History.txt", 0..1).join("\n\n")
|
38
|
+
self.description = paragraphs_of("README.txt", 1..1).join("\n\n")
|
42
39
|
|
43
|
-
|
40
|
+
extra_dev_deps << [ "archive-tar-minitar", "~>0.5.1" ]
|
41
|
+
clean_globs << "coverage"
|
44
42
|
|
45
|
-
|
46
|
-
|
43
|
+
# This is a lie because I will continue to use Archive::Tar::Minitar.
|
44
|
+
self.need_tar = false
|
47
45
|
end
|
48
46
|
|
49
47
|
desc "Build a Color .tar.gz distribution."
|
@@ -102,6 +100,8 @@ task :build_manifest do |t|
|
|
102
100
|
Find.find(".") do |path|
|
103
101
|
next if File.directory?(path)
|
104
102
|
next if path =~ /\.svn/
|
103
|
+
next if path =~ /\.git/
|
104
|
+
next if path =~ /\.hoerc/
|
105
105
|
next if path =~ /\.swp$/
|
106
106
|
next if path =~ %r{coverage/}
|
107
107
|
next if path =~ /~$/
|
data/lib/color.rb
CHANGED
@@ -1,23 +1,21 @@
|
|
1
1
|
# :title: Color -- Colour Management with Ruby
|
2
|
-
# :main:
|
2
|
+
# :main: README.txt
|
3
3
|
|
4
4
|
#--
|
5
5
|
# Color
|
6
6
|
# Colour management with Ruby
|
7
7
|
# http://rubyforge.org/projects/color
|
8
|
-
# Version 1.4.
|
8
|
+
# Version 1.4.1
|
9
9
|
#
|
10
10
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
11
11
|
# distribution for full licensing information.
|
12
12
|
#
|
13
|
-
# Copyright (c) 2005 -
|
14
|
-
#
|
15
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
13
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
16
14
|
#++
|
17
15
|
|
18
16
|
# = Colour Management with Ruby
|
19
17
|
module Color
|
20
|
-
COLOR_VERSION = '1.4.
|
18
|
+
COLOR_VERSION = '1.4.1'
|
21
19
|
|
22
20
|
class RGB; end
|
23
21
|
class CMYK; end
|
@@ -117,7 +115,7 @@ module Color
|
|
117
115
|
end
|
118
116
|
|
119
117
|
# Provides a thin veneer over the Color module to make it seem like this
|
120
|
-
# is Color 0.1.0 (a class) and not Color 1.4.
|
118
|
+
# is Color 0.1.0 (a class) and not Color 1.4.1 (a module). This
|
121
119
|
# "constructor" will be removed in the future.
|
122
120
|
#
|
123
121
|
# mode = :hsl:: +values+ must be an array of [ hue deg, sat %, lum % ].
|
data/lib/color/cmyk.rb
CHANGED
@@ -2,14 +2,12 @@
|
|
2
2
|
# Color
|
3
3
|
# Colour management with Ruby
|
4
4
|
# http://rubyforge.org/projects/color
|
5
|
-
# Version 1.4.
|
5
|
+
# Version 1.4.1
|
6
6
|
#
|
7
7
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
8
8
|
# distribution for full licensing information.
|
9
9
|
#
|
10
|
-
# Copyright (c) 2005 -
|
11
|
-
#
|
12
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
10
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
13
11
|
#++
|
14
12
|
|
15
13
|
# An CMYK colour object. CMYK (cyan, magenta, yellow, and black) colours are
|
data/lib/color/css.rb
CHANGED
@@ -2,14 +2,12 @@
|
|
2
2
|
# Color
|
3
3
|
# Colour management with Ruby
|
4
4
|
# http://rubyforge.org/projects/color
|
5
|
-
# Version 1.4.
|
5
|
+
# Version 1.4.1
|
6
6
|
#
|
7
7
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
8
8
|
# distribution for full licensing information.
|
9
9
|
#
|
10
|
-
# Copyright (c) 2005 -
|
11
|
-
#
|
12
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
10
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
13
11
|
#++
|
14
12
|
|
15
13
|
require 'color'
|
data/lib/color/grayscale.rb
CHANGED
@@ -2,14 +2,12 @@
|
|
2
2
|
# Color
|
3
3
|
# Colour management with Ruby
|
4
4
|
# http://rubyforge.org/projects/color
|
5
|
-
# Version 1.4.
|
5
|
+
# Version 1.4.1
|
6
6
|
#
|
7
7
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
8
8
|
# distribution for full licensing information.
|
9
9
|
#
|
10
|
-
# Copyright (c) 2005 -
|
11
|
-
#
|
12
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
10
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
13
11
|
#++
|
14
12
|
|
15
13
|
# A colour object representing shades of grey. Used primarily in PDF
|
data/lib/color/hsl.rb
CHANGED
@@ -2,14 +2,12 @@
|
|
2
2
|
# Color
|
3
3
|
# Colour management with Ruby
|
4
4
|
# http://rubyforge.org/projects/color
|
5
|
-
# Version 1.4.
|
5
|
+
# Version 1.4.1
|
6
6
|
#
|
7
7
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
8
8
|
# distribution for full licensing information.
|
9
9
|
#
|
10
|
-
# Copyright (c) 2005 -
|
11
|
-
#
|
12
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
10
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
13
11
|
#++
|
14
12
|
|
15
13
|
# An HSL colour object. Internally, the hue (#h), saturation (#s), and
|
data/lib/color/palette.rb
CHANGED
@@ -2,14 +2,12 @@
|
|
2
2
|
# Color
|
3
3
|
# Colour management with Ruby
|
4
4
|
# http://rubyforge.org/projects/color
|
5
|
-
# Version 1.4.
|
5
|
+
# Version 1.4.1
|
6
6
|
#
|
7
7
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
8
8
|
# distribution for full licensing information.
|
9
9
|
#
|
10
|
-
# Copyright (c) 2005 -
|
11
|
-
#
|
12
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
10
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
13
11
|
#++
|
14
12
|
|
15
13
|
require 'color'
|
@@ -2,14 +2,12 @@
|
|
2
2
|
# Color
|
3
3
|
# Colour management with Ruby
|
4
4
|
# http://rubyforge.org/projects/color
|
5
|
-
# Version 1.4.
|
5
|
+
# Version 1.4.1
|
6
6
|
#
|
7
7
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
8
8
|
# distribution for full licensing information.
|
9
9
|
#
|
10
|
-
# Copyright (c) 2005 -
|
11
|
-
#
|
12
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
10
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
13
11
|
#++
|
14
12
|
|
15
13
|
require 'color/palette'
|
data/lib/color/palette/gimp.rb
CHANGED
@@ -2,14 +2,12 @@
|
|
2
2
|
# Color
|
3
3
|
# Colour management with Ruby
|
4
4
|
# http://rubyforge.org/projects/color
|
5
|
-
# Version 1.4.
|
5
|
+
# Version 1.4.1
|
6
6
|
#
|
7
7
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
8
8
|
# distribution for full licensing information.
|
9
9
|
#
|
10
|
-
# Copyright (c) 2005 -
|
11
|
-
#
|
12
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
10
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
13
11
|
#++
|
14
12
|
|
15
13
|
require 'color/palette'
|
@@ -2,14 +2,12 @@
|
|
2
2
|
# Color
|
3
3
|
# Colour management with Ruby
|
4
4
|
# http://rubyforge.org/projects/color
|
5
|
-
# Version 1.4.
|
5
|
+
# Version 1.4.1
|
6
6
|
#
|
7
7
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
8
8
|
# distribution for full licensing information.
|
9
9
|
#
|
10
|
-
# Copyright (c) 2005 -
|
11
|
-
#
|
12
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
10
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
13
11
|
#++
|
14
12
|
|
15
13
|
require 'color/palette'
|
data/lib/color/rgb-colors.rb
CHANGED
@@ -2,14 +2,12 @@
|
|
2
2
|
# Color
|
3
3
|
# Colour management with Ruby
|
4
4
|
# http://rubyforge.org/projects/color
|
5
|
-
# Version 1.4.
|
5
|
+
# Version 1.4.1
|
6
6
|
#
|
7
7
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
8
8
|
# distribution for full licensing information.
|
9
9
|
#
|
10
|
-
# Copyright (c) 2005 -
|
11
|
-
#
|
12
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
10
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
13
11
|
#++
|
14
12
|
|
15
13
|
class Color::RGB
|
data/lib/color/rgb.rb
CHANGED
@@ -2,14 +2,12 @@
|
|
2
2
|
# Color
|
3
3
|
# Colour management with Ruby
|
4
4
|
# http://rubyforge.org/projects/color
|
5
|
-
# Version 1.4.
|
5
|
+
# Version 1.4.1
|
6
6
|
#
|
7
7
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
8
8
|
# distribution for full licensing information.
|
9
9
|
#
|
10
|
-
# Copyright (c) 2005 -
|
11
|
-
#
|
12
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
10
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
13
11
|
#++
|
14
12
|
|
15
13
|
# An RGB colour object.
|
data/lib/color/rgb/metallic.rb
CHANGED
@@ -2,14 +2,12 @@
|
|
2
2
|
# Color
|
3
3
|
# Colour management with Ruby
|
4
4
|
# http://rubyforge.org/projects/color
|
5
|
-
# Version 1.4.
|
5
|
+
# Version 1.4.1
|
6
6
|
#
|
7
7
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
8
8
|
# distribution for full licensing information.
|
9
9
|
#
|
10
|
-
# Copyright (c) 2005 -
|
11
|
-
#
|
12
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
10
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
13
11
|
#++
|
14
12
|
|
15
13
|
# This namespace contains some RGB metallic colours suggested by Jim Freeze.
|
data/lib/color/yiq.rb
CHANGED
@@ -2,14 +2,12 @@
|
|
2
2
|
# Color
|
3
3
|
# Colour management with Ruby
|
4
4
|
# http://rubyforge.org/projects/color
|
5
|
-
# Version 1.4.
|
5
|
+
# Version 1.4.1
|
6
6
|
#
|
7
7
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
8
8
|
# distribution for full licensing information.
|
9
9
|
#
|
10
|
-
# Copyright (c) 2005 -
|
11
|
-
#
|
12
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
10
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
13
11
|
#++
|
14
12
|
|
15
13
|
# A colour object representing YIQ (NTSC) colour encoding.
|
data/test/test_adobecolor.rb
CHANGED
@@ -3,14 +3,12 @@
|
|
3
3
|
# Color
|
4
4
|
# Colour management with Ruby
|
5
5
|
# http://rubyforge.org/projects/color
|
6
|
-
# Version 1.
|
6
|
+
# Version 1.5.0
|
7
7
|
#
|
8
8
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
9
9
|
# distribution for full licensing information.
|
10
10
|
#
|
11
|
-
# Copyright (c) 2005 -
|
12
|
-
#
|
13
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
11
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
14
12
|
#++
|
15
13
|
|
16
14
|
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib") if __FILE__ == $0
|
data/test/test_all.rb
CHANGED
@@ -3,14 +3,12 @@
|
|
3
3
|
# Color
|
4
4
|
# Colour management with Ruby
|
5
5
|
# http://rubyforge.org/projects/color
|
6
|
-
# Version 1.
|
6
|
+
# Version 1.5.0
|
7
7
|
#
|
8
8
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
9
9
|
# distribution for full licensing information.
|
10
10
|
#
|
11
|
-
# Copyright (c) 2005 -
|
12
|
-
#
|
13
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
11
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
14
12
|
#++
|
15
13
|
|
16
14
|
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib") if __FILE__ == $0
|
data/test/test_cmyk.rb
CHANGED
@@ -3,14 +3,12 @@
|
|
3
3
|
# Color
|
4
4
|
# Colour management with Ruby
|
5
5
|
# http://rubyforge.org/projects/color
|
6
|
-
# Version 1.
|
6
|
+
# Version 1.5.0
|
7
7
|
#
|
8
8
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
9
9
|
# distribution for full licensing information.
|
10
10
|
#
|
11
|
-
# Copyright (c) 2005 -
|
12
|
-
#
|
13
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
11
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
14
12
|
#++
|
15
13
|
|
16
14
|
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib") if __FILE__ == $0
|
data/test/test_color.rb
CHANGED
@@ -3,14 +3,12 @@
|
|
3
3
|
# Color
|
4
4
|
# Colour management with Ruby
|
5
5
|
# http://rubyforge.org/projects/color
|
6
|
-
# Version 1.
|
6
|
+
# Version 1.5.0
|
7
7
|
#
|
8
8
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
9
9
|
# distribution for full licensing information.
|
10
10
|
#
|
11
|
-
# Copyright (c) 2005 -
|
12
|
-
#
|
13
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
11
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
14
12
|
#++
|
15
13
|
|
16
14
|
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib") if __FILE__ == $0
|
@@ -87,6 +85,15 @@ module TestColor
|
|
87
85
|
assert_equal(255, Color.normalize_8bit(255))
|
88
86
|
assert_equal(255, Color.normalize_8bit(256))
|
89
87
|
|
88
|
+
assert_equal(0, Color.normalize_16bit(-1))
|
89
|
+
assert_equal(0, Color.normalize_16bit(0))
|
90
|
+
assert_equal(127, Color.normalize_16bit(127))
|
91
|
+
assert_equal(172, Color.normalize_16bit(172))
|
92
|
+
assert_equal(255, Color.normalize_16bit(255))
|
93
|
+
assert_equal(256, Color.normalize_16bit(256))
|
94
|
+
assert_equal(65535, Color.normalize_16bit(65535))
|
95
|
+
assert_equal(65535, Color.normalize_16bit(66536))
|
96
|
+
|
90
97
|
assert_equal(-100, Color.normalize_to_range(-101, -100..100))
|
91
98
|
assert_equal(-100, Color.normalize_to_range(-100.5, -100..100))
|
92
99
|
assert_equal(-100, Color.normalize_to_range(-100, -100..100))
|
data/test/test_css.rb
CHANGED
@@ -3,14 +3,12 @@
|
|
3
3
|
# Color
|
4
4
|
# Colour management with Ruby
|
5
5
|
# http://rubyforge.org/projects/color
|
6
|
-
# Version 1.
|
6
|
+
# Version 1.5.0
|
7
7
|
#
|
8
8
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
9
9
|
# distribution for full licensing information.
|
10
10
|
#
|
11
|
-
# Copyright (c) 2005 -
|
12
|
-
#
|
13
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
11
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
14
12
|
#++
|
15
13
|
|
16
14
|
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib") if __FILE__ == $0
|
data/test/test_gimp.rb
CHANGED
@@ -3,14 +3,12 @@
|
|
3
3
|
# Color
|
4
4
|
# Colour management with Ruby
|
5
5
|
# http://rubyforge.org/projects/color
|
6
|
-
# Version 1.
|
6
|
+
# Version 1.5.0
|
7
7
|
#
|
8
8
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
9
9
|
# distribution for full licensing information.
|
10
10
|
#
|
11
|
-
# Copyright (c) 2005 -
|
12
|
-
#
|
13
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
11
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
14
12
|
#++
|
15
13
|
|
16
14
|
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib") if __FILE__ == $0
|
data/test/test_grayscale.rb
CHANGED
@@ -3,14 +3,12 @@
|
|
3
3
|
# Color
|
4
4
|
# Colour management with Ruby
|
5
5
|
# http://rubyforge.org/projects/color
|
6
|
-
# Version 1.
|
6
|
+
# Version 1.5.0
|
7
7
|
#
|
8
8
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
9
9
|
# distribution for full licensing information.
|
10
10
|
#
|
11
|
-
# Copyright (c) 2005 -
|
12
|
-
#
|
13
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
11
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
14
12
|
#++
|
15
13
|
|
16
14
|
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib") if __FILE__ == $0
|
data/test/test_hsl.rb
CHANGED
@@ -3,16 +3,14 @@
|
|
3
3
|
# Color
|
4
4
|
# Colour management with Ruby
|
5
5
|
# http://rubyforge.org/projects/color
|
6
|
-
# Version 1.
|
6
|
+
# Version 1.5.0
|
7
7
|
#
|
8
8
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
9
9
|
# distribution for full licensing information.
|
10
10
|
#
|
11
|
-
# Copyright (c) 2005 -
|
11
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
12
12
|
#
|
13
13
|
# HSL Tests provided by Adam Johnson
|
14
|
-
#
|
15
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
16
14
|
#++
|
17
15
|
|
18
16
|
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib") if __FILE__ == $0
|
@@ -118,7 +116,7 @@ module TestColor
|
|
118
116
|
assert_equal Color::RGB::Gray80, Color::HSL.new(75, 0, 80)
|
119
117
|
|
120
118
|
# The following tests a bug reported by Adam Johnson on 29 October
|
121
|
-
#
|
119
|
+
# 2010.
|
122
120
|
rgb = Color::RGB.from_fraction(0.34496, 0.1386, 0.701399)
|
123
121
|
c = Color::HSL.new(262, 67, 42).to_rgb
|
124
122
|
assert_in_delta rgb.r, c.r, Color::COLOR_TOLERANCE, "Red"
|
data/test/test_monocontrast.rb
CHANGED
@@ -3,14 +3,12 @@
|
|
3
3
|
# Color
|
4
4
|
# Colour management with Ruby
|
5
5
|
# http://rubyforge.org/projects/color
|
6
|
-
# Version 1.
|
6
|
+
# Version 1.5.0
|
7
7
|
#
|
8
8
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
9
9
|
# distribution for full licensing information.
|
10
10
|
#
|
11
|
-
# Copyright (c) 2005 -
|
12
|
-
#
|
13
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
11
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
14
12
|
#++
|
15
13
|
|
16
14
|
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib") if __FILE__ == $0
|
data/test/test_rgb.rb
CHANGED
@@ -3,14 +3,12 @@
|
|
3
3
|
# Color
|
4
4
|
# Colour management with Ruby
|
5
5
|
# http://rubyforge.org/projects/color
|
6
|
-
# Version 1.
|
6
|
+
# Version 1.5.0
|
7
7
|
#
|
8
8
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
9
9
|
# distribution for full licensing information.
|
10
10
|
#
|
11
|
-
# Copyright (c) 2005 -
|
12
|
-
#
|
13
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
11
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
14
12
|
#++
|
15
13
|
|
16
14
|
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib") if __FILE__ == $0
|
@@ -259,7 +257,7 @@ module TestColor
|
|
259
257
|
assert_not_equal("#002288", Color::RGB.from_html("#008800").to_hsl.html)
|
260
258
|
|
261
259
|
# The following tests a bug reported by Adam Johnson on 29 October
|
262
|
-
#
|
260
|
+
# 2010.
|
263
261
|
hsl = Color::HSL.new(262, 67, 42)
|
264
262
|
c = Color::RGB.from_fraction(0.34496, 0.1386, 0.701399).to_hsl
|
265
263
|
assert_in_delta hsl.h, c.h, Color::COLOR_TOLERANCE, "Hue"
|
data/test/test_yiq.rb
CHANGED
@@ -3,14 +3,12 @@
|
|
3
3
|
# Color
|
4
4
|
# Colour management with Ruby
|
5
5
|
# http://rubyforge.org/projects/color
|
6
|
-
# Version 1.
|
6
|
+
# Version 1.5.0
|
7
7
|
#
|
8
8
|
# Licensed under a MIT-style licence. See Licence.txt in the main
|
9
9
|
# distribution for full licensing information.
|
10
10
|
#
|
11
|
-
# Copyright (c) 2005 -
|
12
|
-
#
|
13
|
-
# $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
|
11
|
+
# Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
|
14
12
|
#++
|
15
13
|
|
16
14
|
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib") if __FILE__ == $0
|
metadata
CHANGED
@@ -1,31 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.4
|
3
|
-
specification_version: 1
|
4
2
|
name: color
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.4.
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
-
|
11
|
-
email:
|
12
|
-
- austin@rubyforge.org
|
13
|
-
- matt@postsomnia.com
|
14
|
-
homepage: http://color.rubyforge.org/
|
15
|
-
rubyforge_project: color
|
16
|
-
description: The capabilities of the Color library are limited to pure mathematical manipulation of the colours based on colour theory without reference to colour profiles (such as sRGB or Adobe RGB). For most purposes, when working with the RGB and HSL colours, this won't matter. However, some colour models (like CIE L*a*b*) are not supported because Color does not yet support colour profiles, giving no meaningful way to convert colours in absolute colour spaces (like L*a*b*, XYZ) to non-absolute colour spaces (like RGB).
|
4
|
+
version: 1.4.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Austin Ziegler
|
8
|
+
- Matt Lyon
|
17
9
|
autorequire:
|
18
|
-
default_executable:
|
19
10
|
bindir: bin
|
20
|
-
has_rdoc: true
|
21
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
22
|
-
requirements:
|
23
|
-
- - ">"
|
24
|
-
- !ruby/object:Gem::Version
|
25
|
-
version: 0.0.0
|
26
|
-
version:
|
27
|
-
platform: ruby
|
28
|
-
signing_key:
|
29
11
|
cert_chain:
|
30
12
|
- |
|
31
13
|
-----BEGIN CERTIFICATE-----
|
@@ -49,17 +31,77 @@ cert_chain:
|
|
49
31
|
BRvUFuFHOwa/yA==
|
50
32
|
-----END CERTIFICATE-----
|
51
33
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
-
|
34
|
+
date: 2010-02-07 00:00:00 -05:00
|
35
|
+
default_executable:
|
36
|
+
dependencies:
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: rubyforge
|
39
|
+
type: :development
|
40
|
+
version_requirement:
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 2.0.3
|
46
|
+
version:
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: gemcutter
|
49
|
+
type: :development
|
50
|
+
version_requirement:
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 0.3.0
|
56
|
+
version:
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: archive-tar-minitar
|
59
|
+
type: :development
|
60
|
+
version_requirement:
|
61
|
+
version_requirements: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ~>
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: 0.5.1
|
66
|
+
version:
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: hoe
|
69
|
+
type: :development
|
70
|
+
version_requirement:
|
71
|
+
version_requirements: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.5.0
|
76
|
+
version:
|
77
|
+
description: |-
|
78
|
+
The capabilities of the Color library are limited to pure mathematical
|
79
|
+
manipulation of the colours based on colour theory without reference to colour
|
80
|
+
profiles (such as sRGB or Adobe RGB). For most purposes, when working with the
|
81
|
+
RGB and HSL colours, this won't matter. However, some colour models (like CIE
|
82
|
+
L*a*b*) are not supported because Color does not yet support colour profiles,
|
83
|
+
giving no meaningful way to convert colours in absolute colour spaces (like
|
84
|
+
L*a*b*, XYZ) to non-absolute colour spaces (like RGB).
|
85
|
+
email:
|
86
|
+
- austin@rubyforge.org
|
87
|
+
- matt@postsomnia.com
|
88
|
+
executables: []
|
89
|
+
|
90
|
+
extensions: []
|
91
|
+
|
92
|
+
extra_rdoc_files:
|
93
|
+
- History.txt
|
94
|
+
- Install.txt
|
95
|
+
- Licence.txt
|
96
|
+
- Manifest.txt
|
97
|
+
- README.txt
|
56
98
|
files:
|
57
99
|
- History.txt
|
58
100
|
- Install.txt
|
59
101
|
- Licence.txt
|
60
102
|
- Manifest.txt
|
103
|
+
- README.txt
|
61
104
|
- Rakefile
|
62
|
-
- Readme.txt
|
63
105
|
- lib/color.rb
|
64
106
|
- lib/color/cmyk.rb
|
65
107
|
- lib/color/css.rb
|
@@ -85,38 +127,44 @@ files:
|
|
85
127
|
- test/test_monocontrast.rb
|
86
128
|
- test/test_rgb.rb
|
87
129
|
- test/test_yiq.rb
|
88
|
-
|
89
|
-
|
130
|
+
has_rdoc: true
|
131
|
+
homepage: http://color.rubyforge.org/
|
132
|
+
licenses: []
|
133
|
+
|
134
|
+
post_install_message:
|
90
135
|
rdoc_options:
|
91
136
|
- --main
|
92
137
|
- README.txt
|
93
|
-
|
94
|
-
-
|
95
|
-
|
96
|
-
|
97
|
-
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
138
|
+
require_paths:
|
139
|
+
- lib
|
140
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: "0"
|
145
|
+
version:
|
146
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - ">="
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: "0"
|
151
|
+
version:
|
102
152
|
requirements: []
|
103
153
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
version: 1.3.0
|
122
|
-
version:
|
154
|
+
rubyforge_project: color
|
155
|
+
rubygems_version: 1.3.5
|
156
|
+
signing_key:
|
157
|
+
specification_version: 3
|
158
|
+
summary: Colour management with Ruby
|
159
|
+
test_files:
|
160
|
+
- test/test_adobecolor.rb
|
161
|
+
- test/test_all.rb
|
162
|
+
- test/test_cmyk.rb
|
163
|
+
- test/test_color.rb
|
164
|
+
- test/test_css.rb
|
165
|
+
- test/test_gimp.rb
|
166
|
+
- test/test_grayscale.rb
|
167
|
+
- test/test_hsl.rb
|
168
|
+
- test/test_monocontrast.rb
|
169
|
+
- test/test_rgb.rb
|
170
|
+
- test/test_yiq.rb
|
metadata.gz.sig
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
�
|
3
|
-
|
1
|
+
�(���<*���u|:K?6u�� �<'��린
|
2
|
+
$ ;֩N� ���D��ޟύ��'ɇ3��#e�e ?�I�8Ʋ�J�F��Zt�
|
3
|
+
p�G�fm�$P�]z UT�`���l�%�l!�w1F��U���ɈX�E,o_s|ؔ4
|