Clean up color handling in JSON and get XML working again.