fix: Improve image captcha contrast for dark mode#36265
Merged
silverwind merged 4 commits intogo-gitea:mainfrom Jan 24, 2026
Merged
Conversation
The image captcha was using random colors which often resulted in poor contrast against dark backgrounds, making it difficult or impossible for users to read in dark mode. This fix configures a color palette with high-contrast colors that provide good visibility in both light and dark themes, improving accessibility and user experience. Fixes go-gitea#36255 Signed-off-by: majiayu000 <1835304752@qq.com>
silverwind
approved these changes
Jan 24, 2026
Member
Contributor
Author
|
@silverwind Thanks for the review and change! |
lunny
approved these changes
Jan 24, 2026
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Jan 26, 2026
* giteaofficial/main: Normalize guessed languages for code highlighting (go-gitea#36450) Add `knip` linter (go-gitea#36442) Fix various bugs (go-gitea#36446) Update tool dependencies (go-gitea#36445) Update JS dependencies, adjust webpack config, misc fixes (go-gitea#36431) fix: Improve image captcha contrast for dark mode (go-gitea#36265) Refactor template render (go-gitea#36438) Add documentation for markdown anchor post-processing (go-gitea#36443) Fix markup heading parsing, fix emphasis parsing (go-gitea#36284) Front port changelog for 1.25.4 (go-gitea#36432) Bugfix: Potential incorrect runID in run status update (go-gitea#36437) Restrict branch naming when new change matches with protection rules (go-gitea#36405)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Summary
This PR fixes #36255
The image captcha was using random colors which often resulted in poor contrast against dark backgrounds, making it difficult or impossible for users to read in dark mode.
Changes
services/context/captcha.goTesting
gitea.com/go-chi/captchalibraryGenerated with Claude Code