Colimits in categories of diagrams