Skip to content
Browse files

small fix to force color length to histogram

  • Loading branch information...
1 parent b7bdca6 commit 27db6195d9fa6809aaa49919c41ef60d1a17ce65 Diego Rossini Vieira committed Oct 30, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/colorscore/histogram.rb
View
2 lib/colorscore/histogram.rb
@@ -8,7 +8,7 @@ def initialize(image_path, colors=16, depth=8)
# Returns an array of colors in descending order of occurances.
def colors
hex_values = @lines.map { |line| line[/#[0-9A-F]+/] }
- hex_values.map { |hex| Color::RGB.from_html(*hex) }
+ hex_values.map { |hex| Color::RGB.from_html(*hex[0..6]) }
end
def color_counts

0 comments on commit 27db619

Please sign in to comment.
Something went wrong with that request. Please try again.