added functionality for mailjet colors; refactored some code for Spark functions