Skip to content

Commit ac7b24c

Browse files
committed
Fix for copy/paste error
1 parent 165f91a commit ac7b24c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/graphviz/utils/colors.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,21 @@ def rgb(r, g, b, a = nil)
2424
if g.is_a?(Fixnum)
2525
g = g.to_s.convert_base(10, 16)
2626
end
27-
unless g.is_a?(String) and HEX_FOR_COLOR.match(r)
27+
unless g.is_a?(String) and HEX_FOR_COLOR.match(g)
2828
raise ColorException, "Bad green value"
2929
end
3030

3131
if b.is_a?(Fixnum)
3232
b = b.to_s.convert_base(10, 16)
3333
end
34-
unless b.is_a?(String) and HEX_FOR_COLOR.match(r)
34+
unless b.is_a?(String) and HEX_FOR_COLOR.match(b)
3535
raise ColorException, "Bad blue value"
3636
end
3737

3838
if a.is_a?(Fixnum)
3939
a = a.to_s.convert_base(10, 16)
4040
end
41-
unless a.nil? or (a.is_a?(String) and HEX_FOR_COLOR.match(r))
41+
unless a.nil? or (a.is_a?(String) and HEX_FOR_COLOR.match(a))
4242
raise ColorException, "Bad alpha value"
4343
end
4444

0 commit comments

Comments
 (0)