/ Published in: Ruby
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
possible_colors = [0xff0000, 0x00ff00, 0x0000ff, 0xffff00, 0x00ffff, 0xffffff] good_color = 0 # We can default to black... possible_colors.each do |c| if colors_diff_ok? c, my_color good_color = c break end end