To retain the bright green color of basil in pesto, you can blanch the basil leaves, add lemon juice, protect it a ziploc bag before rolling, or mist oil on leaves before cutting.