From b66b0f14836228dcc97b8aaea6d7b627b765c444 Mon Sep 17 00:00:00 2001
From: Piotr Potrebka <piotr.potrebka@wpdesk.net>
Date: Thu, 9 Mar 2023 14:00:53 +0100
Subject: [PATCH] feat: email styles

---
 templates/html/email-styles.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/templates/html/email-styles.php b/templates/html/email-styles.php
index 450345c..2fae35b 100644
--- a/templates/html/email-styles.php
+++ b/templates/html/email-styles.php
@@ -9,11 +9,11 @@ if ( ! defined( 'ABSPATH' ) ) {
 }
 
 // Load colors.
-$bg        = $params['bg'];
-$body      = $params['body'];
-$base      = $params['primary'];
+$bg        = $params['bg'] ?? '#f8f8f8';
+$body      = $params['body'] ?? '#ffffff';
+$base      = $params['primary'] ?? '#5c9a2c';
 $base_text = Template::light_or_dark( $base, '#171717', '#ffffff' );
-$text      = $params['text'];
+$text      = $params['text'] ?? '#33333';
 
 // Pick a contrasting color for links.
 $link_color = Template::is_hex_light( $base ) ? $base : $base_text;
-- 
GitLab