PHPackages                             xsanz/magento2-module-admin-color-captcha - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. xsanz/magento2-module-admin-color-captcha

ActiveMagento2-module[Security](/categories/security)

xsanz/magento2-module-admin-color-captcha
=========================================

Magento 2 admin image CAPTCHA with optional per-character colors and grayscale noise (XavierSanz\_ColorCaptcha).

1.0.0(1mo ago)13↓100%1MITPHPPHP ^8.1

Since May 8Pushed 1mo agoCompare

[ Source](https://github.com/xsanz/magento2-module-admin-color-captcha)[ Packagist](https://packagist.org/packages/xsanz/magento2-module-admin-color-captcha)[ RSS](/packages/xsanz-magento2-module-admin-color-captcha/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Admin Color Captcha
===================

[](#admin-color-captcha)

Admin image CAPTCHA enhancement for Magento 2: optional **per-character colors** and **grayscale noise** for better readability on the backend login (and other admin forms that use the default image CAPTCHA). Storefront CAPTCHA is unchanged.

- **License:** MIT — see [LICENSE.txt](LICENSE.txt).

Requirements
------------

[](#requirements)

- Magento 2.4.x (Open Source or Adobe Commerce) with `Magento_Captcha` enabled
- PHP 8.x (match your Magento installation)
- GD extension with FreeType (`imagefttext`) support (same as core image CAPTCHA)

Installation
------------

[](#installation)

### Option A — `app/code` (typical)

[](#option-a--appcode-typical)

1. Ensure the module lives at:

    `app/code/XavierSanz/ColorCaptcha/`
2. Enable the module and update the database:

    ```
    bin/magento module:enable XavierSanz_ColorCaptcha
    bin/magento setup:upgrade
    ```
3. Recompile DI (production mode) and flush caches:

    ```
    bin/magento setup:di:compile
    bin/magento cache:flush
    ```

### Option B — Composer (path repository)

[](#option-b--composer-path-repository)

The package name is **`xsanz/magento2-module-admin-color-captcha`** (see [composer.json](composer.json)). In the **Magento project** `composer.json`, add a path repository pointing at this directory, then:

```
composer require xsanz/magento2-module-admin-color-captcha:^1.0
bin/magento module:enable XavierSanz_ColorCaptcha
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush
```

Adjust the version constraint if you tag releases (e.g. `^1.0`).

How to use
----------

[](#how-to-use)

### 1. Turn on admin CAPTCHA (core)

[](#1-turn-on-admin-captcha-core)

Per-character colors only apply when **Admin CAPTCHA** is enabled.

1. In the Admin, go to **Stores → Configuration**.
2. Open **Advanced → Admin → CAPTCHA**.
3. Set **Enable CAPTCHA in Admin** to **Yes** and configure forms, mode, and attempts as needed.

### 2. Enable per-character color mode (this module)

[](#2-enable-per-character-color-mode-this-module)

In the same section (**Advanced → Admin → CAPTCHA**), below the standard fields:

1. Set **Enable Per-Character Color CAPTCHA** to **Yes**.
2. Optionally adjust **Text luminance** and **Noise luminance** fields (all are **0–255**, BT.601 luminance).

**Defaults** (from `etc/config.xml`, restorable via **Use Default** in the UI):

SettingDefaultPurposeEnable Per-Character Color CAPTCHA**No** (opt-in)Off = stock Laminas image; On = colored glyphs + gray noiseText luminance min`0`Darkest allowed brightness for glyphsText luminance max`105`Lightest allowed for glyphs (keep low for contrast on white)Noise luminance min`140`Darkest gray for dots/linesNoise luminance max`160`Lightest gray for noiseKeep **text luminance max** clearly **below** **noise luminance min** so letters stay darker than the noise.

[![image](https://private-user-images.githubusercontent.com/489587/583309488-1e1565dc-08f9-43fb-ac7a-d324f58ef20d.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODEwNzIwNzEsIm5iZiI6MTc4MTA3MTc3MSwicGF0aCI6Ii80ODk1ODcvNTgzMzA5NDg4LTFlMTU2NWRjLTA4ZjktNDNmYi1hYzdhLWQzMjRmNThlZjIwZC5wbmc_WC1BbXotQW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MTI1NzcxNzNjMjE0MjA3ZTljJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.-2FGZp9_jJxDtS3yV2oUjZOSJPHtRmESblgNvIE7KJg)### 3. When you will see it

[](#3-when-you-will-see-it)

Admin CAPTCHA appears according to your **Displaying Mode** (e.g. after failed login attempts). Refresh the CAPTCHA image with the reload control next to the image if needed.

[![image](https://private-user-images.githubusercontent.com/489587/583308387-c8b0962e-f0b9-4e90-b94f-6a3af0d5d1eb.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODEwNzIwNzEsIm5iZiI6MTc4MTA3MTc3MSwicGF0aCI6Ii80ODk1ODcvNTgzMzA4Mzg3LWM4YjA5NjJlLWYwYjktNGU5MC1iOTRmLTZhM2FmMGQ1ZDFlYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDYxMFQwNjA5MzFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03ZGU4MmU2OWNmNDBjZjFkNzJlN2QzYWQ0Y2IzZmE3OGMwYjVjMGQwZjUyMTEyZWRmZGE2YWZhZDRkMjBjOGQ1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.URu_R9lbxst3kMMWScJM_KJWt7jU2F6jKuDXIGmhBt8)](https://private-user-images.githubusercontent.com/489587/583308387-c8b0962e-f0b9-4e90-b94f-6a3af0d5d1eb.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODEwNzIwNzEsIm5iZiI6MTc4MTA3MTc3MSwicGF0aCI6Ii80ODk1ODcvNTgzMzA4Mzg3LWM4YjA5NjJlLWYwYjktNGU5MC1iOTRmLTZhM2FmMGQ1ZDFlYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDYxMFQwNjA5MzFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03ZGU4MmU2OWNmNDBjZjFkNzJlN2QzYWQ0Y2IzZmE3OGMwYjVjMGQwZjUyMTEyZWRmZGE2YWZhZDRkMjBjOGQ1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.URu_R9lbxst3kMMWScJM_KJWt7jU2F6jKuDXIGmhBt8)Behavior notes
--------------

[](#behavior-notes)

- **Admin only:** The module replaces `Magento\Captcha\Model\DefaultModel` only in the **adminhtml** area. Customer-facing CAPTCHA is not affected.
- **With the feature off:** Behavior matches core (single-color Laminas image pipeline).
- **With the feature on:** Each character is drawn in a random color within the text luminance bounds; noise is **grayscale** only; distortion uses an RGB-preserving resample so colors remain visible after the wave transform.

Configuration scope
-------------------

[](#configuration-scope)

The CAPTCHA group is available per **website** scope in Configuration. If you use multiple websites, set values under the scope where you manage admin settings (often **Default Config**).

Uninstall
---------

[](#uninstall)

```
bin/magento module:disable XavierSanz_ColorCaptcha
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush
```

Remove the module files if you no longer need them. Config keys under `admin/captcha/*` for this module may remain in the `core_config_data` table until cleaned up manually if required.

Support
-------

[](#support)

Issues and improvements: maintain in your project or VCS as appropriate for `XavierSanz_ColorCaptcha`.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance93

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

33d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e463aa239471f3b9433e67cf5be0f124a3d4c4923298af8f19b1f9913c6d9ed?d=identicon)[xihuan](/maintainers/xihuan)

---

Top Contributors

[![xsanz](https://avatars.githubusercontent.com/u/489587?v=4)](https://github.com/xsanz "xsanz (4 commits)")

### Embed Badge

![Health badge](/badges/xsanz-magento2-module-admin-color-captcha/health.svg)

```
[![Health](https://phpackages.com/badges/xsanz-magento2-module-admin-color-captcha/health.svg)](https://phpackages.com/packages/xsanz-magento2-module-admin-color-captcha)
```

###  Alternatives

[magepal/magento2-gmailsmtpapp

Magento 2 SMTP Extension - Configure Magento 2 to send all transactional email using Gmail, G Suite, Amazon SES, Office360, Mailgun, SendGrid, Mandrill or any other SMTP servers

3271.9M2](/packages/magepal-magento2-gmailsmtpapp)[mollie/magento2

Mollie Payment Module for Magento 2

1131.8M12](/packages/mollie-magento2)[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

68353.9k](/packages/run-as-root-magento2-prometheus-exporter)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1010.0k22](/packages/loki-magento2-components)[imi/magento2-friendly-captcha

Friendly Captcha integration for Magento2

19125.8k](/packages/imi-magento2-friendly-captcha)[sansec/magento2-module-shield

15164.3k](/packages/sansec-magento2-module-shield)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
