Files
  • main.rb
main.rb
1
2
3
4
5
6
7
c1 = "#15293E"
c2 = "#012549"

rgbs = c1[1..-1].scan(/../), c2[1..-1].scan(/../)
c = "#%02X%02X%02X" % rgbs.transpose.map{|h1, h2| (h1.hex + h2.hex)/2 }

puts c
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]