ssx.rb
# Generate all possible combinations between fg_base and bg_base colors.
# Returns two arrays of the same size, first contains fg colors, second
# contains bg colors.
Generate all possible combinations between fg_base and bg_base colors.
Returns two arrays of the same size, first contains fg colors, second
contains bg colors.
Generate all possible combinations between fg_base and bg_base colors . Returns two arrays of the same size first contains fg colors second contains bg colors .
def generate_color_combinations fg_base, bg_base
  combinations = fg_base.product(bg_base)
  fg_colors = []
  bg_colors = []
  combinations.each do |c|
    fg_colors.push c[0]
    bg_colors.push c[1]
  end
  [fg_colors, bg_colors]
end
def generate_color_combinations fg_base , bg_base combinations = fg_base . product ( bg_base ) fg_colors = [ ] bg_colors = [ ] combinations . each do | c | fg_colors . push c [ 0 ] bg_colors . push c [ 1 ] end [ fg_colors , bg_colors ] end
Generate all possible combinations between fg_base and bg_base colors.
Generate all possible combinations between fg_base and bg_base colors .
fg_base
bg_base