regenerate (Color::Palette::MonoContrast)

         # File lib/color/palette/monocontrast.rb, line 96
     96:   def regenerate(background, foreground = nil)
     97:     foreground ||= background
     98:     background = background.to_rgb
     99:     foreground = foreground.to_rgb
    100:
    101:     @background = {}
    102:     @foreground = {}
    103:
    104:     @background[-5] = background.darken_by(10)
    105:     @background[-4] = background.darken_by(25)
    106:     @background[-3] = background.darken_by(50)
    107:     @background[-2] = background.darken_by(75)
    108:     @background[-1] = background.darken_by(85)
    109:     @background[ 0] = background
    110:     @background[+1] = background.lighten_by(85)
    111:     @background[+2] = background.lighten_by(75)
    112:     @background[+3] = background.lighten_by(50)
    113:     @background[+4] = background.lighten_by(25)
    114:     @background[+5] = background.lighten_by(10)
    115:
    116:     @foreground[-5] = calculate_foreground(@background[-5], foreground)
    117:     @foreground[-4] = calculate_foreground(@background[-4], foreground)
    118:     @foreground[-3] = calculate_foreground(@background[-3], foreground)
    119:     @foreground[-2] = calculate_foreground(@background[-2], foreground)
    120:     @foreground[-1] = calculate_foreground(@background[-1], foreground)
    121:     @foreground[ 0] = calculate_foreground(@background[ 0], foreground)
    122:     @foreground[+1] = calculate_foreground(@background[+1], foreground)
    123:     @foreground[+2] = calculate_foreground(@background[+2], foreground)
    124:     @foreground[+3] = calculate_foreground(@background[+3], foreground)
    125:     @foreground[+4] = calculate_foreground(@background[+4], foreground)
    126:     @foreground[+5] = calculate_foreground(@background[+5], foreground)
    127:   end