From d44e64e496db28d9a97dedf6e29f76950b69f89a Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Fri, 14 Dec 2018 06:19:53 +0100 Subject: [PATCH] Exclude colors that do not pass WCAG 2.0 AA level (#70) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Green and Yellow are too light and impact on user’s ability to read the Captcha. Deep Purple and Pink are better choices Ref: https://www.w3.org/TR/WCAG/#contrast-minimum --- CHANGELOG.md | 5 ++++ ext/rucaptcha/colors.h | 64 +++++++++++++++++++++--------------------- 2 files changed, 37 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51cf9f5..d906ead 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +2.3.2 +------- + +- Change Yellow and Green colors to Pink and Deep Purple to pass WCAG 2.0's contrast test + 2.3.1 ------- diff --git a/ext/rucaptcha/colors.h b/ext/rucaptcha/colors.h index 840bf98..f4a633d 100644 --- a/ext/rucaptcha/colors.h +++ b/ext/rucaptcha/colors.h @@ -78,41 +78,41 @@ static char *colors[] = { "\x29\x62\xFF" "\xff\xff\xff" "," "\0\0\0\0" "\xc8\0\x46\0" "\0" "\x04", - // Green A700 #00C853 + // Pink A700 #C51162 "GIF89a" "\xc8\0\x46\0" "\x83" "\0\0" - "\x00\xC8\x53" - "\x00\xC8\x53" - "\x00\xC8\x53" - "\x00\xC8\x53" - "\x00\xC8\x53" - "\x00\xC8\x53" - "\x00\xC8\x53" - "\x00\xC8\x53" - "\x00\xC8\x53" - "\x00\xC8\x53" - "\x00\xC8\x53" - "\x00\xC8\x53" - "\x00\xC8\x53" - "\x00\xC8\x53" - "\x00\xC8\x53" + "\xC5\x11\x62" + "\xC5\x11\x62" + "\xC5\x11\x62" + "\xC5\x11\x62" + "\xC5\x11\x62" + "\xC5\x11\x62" + "\xC5\x11\x62" + "\xC5\x11\x62" + "\xC5\x11\x62" + "\xC5\x11\x62" + "\xC5\x11\x62" + "\xC5\x11\x62" + "\xC5\x11\x62" + "\xC5\x11\x62" + "\xC5\x11\x62" "\xff\xff\xff" "," "\0\0\0\0" "\xc8\0\x46\0" "\0" "\x04", - // Yellow A700 #FFD600 + // Deep Purple A700 #6200EA "GIF89a" "\xc8\0\x46\0" "\x83" "\0\0" - "\xFF\xD6\x00" - "\xFF\xD6\x00" - "\xFF\xD6\x00" - "\xFF\xD6\x00" - "\xFF\xD6\x00" - "\xFF\xD6\x00" - "\xFF\xD6\x00" - "\xFF\xD6\x00" - "\xFF\xD6\x00" - "\xFF\xD6\x00" - "\xFF\xD6\x00" - "\xFF\xD6\x00" - "\xFF\xD6\x00" - "\xFF\xD6\x00" - "\xFF\xD6\x00" + "\x62\x00\xEA" + "\x62\x00\xEA" + "\x62\x00\xEA" + "\x62\x00\xEA" + "\x62\x00\xEA" + "\x62\x00\xEA" + "\x62\x00\xEA" + "\x62\x00\xEA" + "\x62\x00\xEA" + "\x62\x00\xEA" + "\x62\x00\xEA" + "\x62\x00\xEA" + "\x62\x00\xEA" + "\x62\x00\xEA" + "\x62\x00\xEA" "\xff\xff\xff" "," "\0\0\0\0" "\xc8\0\x46\0" "\0" "\x04" };