Apply gradients to edges