From ab986677dc5d9106e3f9d9ccb0437a27fca4b546 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Tue, 22 Aug 2023 11:40:13 +0200 Subject: [PATCH] Color picker use color blind palette "Tableau 10" by Maureen Stone by default #1199 --- dev/External/SquireUI.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/dev/External/SquireUI.js b/dev/External/SquireUI.js index 0924fffb5..16d6f267b 100644 --- a/dev/External/SquireUI.js +++ b/dev/External/SquireUI.js @@ -281,6 +281,27 @@ class SquireUI clr.type = 'color'; toolbar.append(clr); + // Chrome https://github.com/the-djmaze/snappymail/issues/1199 + let clrid = 'squire-colors', + colorlist = doc.getElementById(clrid), + add = hex => colorlist.append(new Option(hex)); + if (!colorlist) { + colorlist = createElement('datalist'); + colorlist.id = clrid; + // Color blind safe Tableau 10 by Maureen Stone + add('#4E79A7'); + add('#F28E2B'); + add('#E15759'); + add('#76B7B2'); + add('#59A14F'); + add('#EDC948'); + add('#B07AA1'); + add('#FF9DA7'); + add('#9C755F'); + add('#BAB0AC'); + doc.body.append(colorlist); + } + clr.setAttribute('list', clrid); browseImage.type = 'file'; browseImage.accept = 'image/*';