From 036834a1d04f15a73663d27b2be9f4901cf69815 Mon Sep 17 00:00:00 2001 From: liuwenxin <1009266660@qq.com> Date: Mon, 19 Oct 2026 15:55:02 +0800 Subject: [PATCH] =?UTF-8?q?style(backend):=20=E9=AA=8C=E8=AF=81=E7=A0=81?= =?UTF-8?q?=E9=85=8D=E8=89=B2=E5=88=87=E6=8D=A2=E8=87=B3=20v3=20=E4=B8=AD?= =?UTF-8?q?=E6=80=A7=E8=89=B2=E4=BD=93=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 字符/干扰/噪点/底色改用 --ys-ink / --ys-ink-2 / --ys-ink-3 / --ys-paper 对应色值,与 2026-10-12 后的前端视觉方向一致;识别难度参数未变, tests/unit/test_captcha.py 12 项通过。 Co-Authored-By: Claude Code --- backend/app/core/captcha_image.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/backend/app/core/captcha_image.py b/backend/app/core/captcha_image.py index eb7c631..d6e0cd2 100644 --- a/backend/app/core/captcha_image.py +++ b/backend/app/core/captcha_image.py @@ -27,11 +27,12 @@ _WIDTH, _HEIGHT = 120, 40 _FONT_SIZE = 25 _PADDING = 8 -# 与前端配色呼应:墨色字符、青灰干扰、素纸底 -_INK = (15, 54, 70) -_INTERFERENCE = (126, 156, 170) -_SPECKLE = (168, 183, 192) -_PAPER = (247, 246, 242) +# 与前端 v3 配色呼应(--ys-ink / --ys-ink-2 / --ys-ink-3 / --ys-paper): +# 墨色字符、次级墨干扰、辅助墨噪点、纸白底 +_INK = (28, 35, 51) # #1c2333 +_INTERFERENCE = (91, 101, 119) # #5b6577 +_SPECKLE = (154, 163, 178) # #9aa3b2 +_PAPER = (255, 255, 255) # #ffffff _SPECKLE_COUNT = 46 _INTERFERENCE_LINES = 2