Oxidization will occur when the pesto comes into contact with air, this is normal. To prevent discoloration, make sure to cover the pesto with a thick layer of olive oil when storing it in the fridge. You can also add a squeeze of lemon juice to help prevent the basil from turning a brownish color. If you want to take it a step further, you can blanch the basil leaves before preparing your pesto to prevent any discoloration.