Group all items by color and place them to boxes. When item selected can be stacked. Dont forget about capacities.