{{each values}} ${( color = 0 ),''} {{each variants}} {{if position == 1}} ${( color = variants[($index)].option1 ),''} {{/if}} {{if position == 2}} ${( color = variants[($index)].option2 ),''} {{/if}} {{if position == 3}} ${( color = variants[($index)].option3 ),''} {{/if}} {{if colorlist.indexOf(color) < 0}} {{if count < 4}}