Creating a colored buttercream icing can be an exercise in frustration for novice bakers. Good quality buttercream isn't hard to make, but it does require some practice and a degree of patience. Tinting it to the right color can also be maddening, because food colorings vary widely in strength and can sometimes give unpredictable results. Even worse, adding color to your buttercream can sometimes cause it to separate or "break." Don't let this intimidate you, because there are well-established ways to avoid or fix the problem.
Try to Blend In
Unless you've had a batch go wrong, it's easy to overlook how complex buttercream icing really is. Like mayonnaise, it's an emulsion -- a group of dissimilar ingredients coerced into joining together in a stable mixture. Butter itself includes both fat and water, and the buttercream must also incorporate sugar and, usually, some form of eggs. Adding liquid to that mixture in the form of flavorings or colorings can destabilize the emulsion and cause the liquids and fats to separate from each other.
Use Some Concentration
The simplest way to prevent your buttercream from separating is not to use liquid colorings at all. Liquid colorings, especially those from the supermarket, are relatively weak and are best used a drop or two at a time to create pastels and gentle hues. For more vivid colors, use the gel or dry powder colorings available from hobby and bakery-supply shops. These are highly concentrated and add little or no liquid to your icing, eliminating the risk of it breaking. This is how professional decorators create their bold hues and black buttercreams.
Following your buttercream recipe as diligently as possible will also go a long way toward keeping you out of trouble. The temperature of your butter is especially important. If it's too cold it won't mix freely with the other ingredients, but if it's beginning to melt it can't form a good emulsion. At its ideal temperature of about 70 degrees Fahrenheit, it's soft enough to mix well but firm enough to give structure to the buttercream. If you heat and cool your other ingredients according to the recipe's instructions, then add butter at the correct temperature, the risk of your icing separating when you add the color is minimal.
Getting It Back Together
Even if your buttercream breaks at the crucial moment, all is not lost. Often, just continuing to whip the icing in your stand mixer will eventually bring it back together. If your butter was too soft, you can chill the mixture by holding an icepack against the bowl of your stand mixer, or by resting your mixing bowl in ice water while you use a hand mixer. If the icing stubbornly refuses to come back together, add a tablespoon or two of shortening to the mixture. It restores the balance of fat and liquid, and its higher melting point lends extra stability to the buttercream.