lib/ric/colors.rb
def flag3(str,left_color='brown',middle_color='pink',right_color='red')
    m = str.length / 3
    remainder = str.length % 3
    central_length = remainder == 1 ? m+1 : m 
    lateral_length = remainder == 2 ? m+1 : m 
    colora(  left_color,    str[ 0 .. lateral_length-1] ) + 
      colora( middle_color, str[ lateral_length .. lateral_length+central_length-1] ) + 
      colora( right_color, str[ lateral_length+central_length .. str.length ] )  
  end
def flag3(str,left_color='brown',middle_color='pink',right_color='red')
    m = str.length / 3
    remainder = str.length % 3
    central_length = remainder == 1 ? m+1 : m 
    lateral_length = remainder == 2 ? m+1 : m 
    colora(  left_color,    str[ 0 .. lateral_length-1] ) + 
      colora( middle_color, str[ lateral_length .. lateral_length+central_length-1] ) + 
      colora( right_color, str[ lateral_length+central_length .. str.length ] )  
  end
for simmetry padding
 m = length / 3
 6: 2 2 2        m   m   m    REST 0
 5: 2 1 2       m+1  m  m+1        2
 4: 1 2 1        m  m+1  m         1