PHPackages                             wutongshenyuan/qrcode\_prettify - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. wutongshenyuan/qrcode\_prettify

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

wutongshenyuan/qrcode\_prettify
===============================

生成二维码，美化二维码

v0.0.3(3y ago)3166[1 issues](https://github.com/wutongshenyuan/qrcode-prettify/issues)Apache-2.0PHPPHP &gt;=7.0

Since Aug 6Pushed 3y ago1 watchersCompare

[ Source](https://github.com/wutongshenyuan/qrcode-prettify)[ Packagist](https://packagist.org/packages/wutongshenyuan/qrcode_prettify)[ RSS](/packages/wutongshenyuan-qrcode-prettify/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

\#二维码美化 二维码美化方案： 1 修改前景色背景色 已实现 2 用图片做前景背景，动图会更炫 已实现前景图 3 添加logo 已实现 4 码眼换成其它图案，只要保证其遮盖面积与使用深色系， 就不会影响识别，只在液化效果中更换了码眼，未单独实现更换码眼 5 放一些小动物在黑色方块上 未实现 6 黑色方块改成小圆点 已实现 7 黑色方块液化效果 已实现 ##使用方法 usage

```
$opt = new QrcodeOptions();
$opt->setForegroundColor(new RGBA(0,255,0));
$opt->setBackgroundColor(new RGBA(255,255,0));
$qrcodeBase64 = Qrcode::make('https://www.baidu.com',$opt);

```

通过设置QrcodeOptions参数可以实现多种效果 ##修改前景色 背景色 change foreground-color and background-color `$opt->setForegroundColor(new RGBA(0,255,0));`

`$opt->setBackgroundColor(new RGBA(255,255,0));`\##添加logo add logo `$opt->setLogo(logourl);`\##使用图片做前景 use a picture for foreground 注意：使用前景图片，会忽略前景色，背景色 就是会忽略setForegroundColor和setBackgroundColor

`$opt->setForegroundImg(Foreground::FOREGROUND_IMG_BEAUTY);`

此软件包内置了一些前景图，可以通过Foreground类常量来调用，也可以传入自己的前景图url地址。 内置的前景图在src\\Foreground\\ForegroundImages目录下，sample目录下与前景图同名文件是其对应的效果，可以按需选用

\##圆点效果 dot effect RADIUS\_LEVEL\_x 用来控制圆弧半径的大小，分为十个等级， 当为RADIUS\_LEVEL\_10的时候，会完全变成圆点，其它的等级， 会显示圆角 `$opt->setDotRadius(QrcodeOptions::RADIUS_LEVEL_10);`

\##液化效果 liquid effect RADIUS\_LEVEL\_x，同理也是用来控制液化程度的 `$opt->setLiquidRadius(QrcodeOptions::RADIUS_LEVEL_10);`

渐变色二维码
------

[](#渐变色二维码)

```
$opt->setGradientForegroundColor(new RGBA(247, 17, 5,0),new RGBA(3, 142, 234,0),QrcodeOptions::GRADIEN_DIR_VERTICAL);//水平渐变
$opt->setGradientForegroundColor(new RGBA(247, 17, 5,0),new RGBA(3, 142, 234,0),QrcodeOptions::GRADIEN_DIR_HORIZONTAL);// 垂直渐变
$opt->setGradientForegroundColor(new RGBA(247, 17, 5,0),new RGBA(3, 142, 234,0),QrcodeOptions::GRADIEN_DIR_DIAGONAL);//对角线渐变

```

当然，各种效果是可以组合使用的

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

Every ~148 days

Total

3

Last Release

1442d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/10d43ad6e6dd1dd327f5ee0a9d59a4980e41eb616f594f92c715e559a3dccf5f?d=identicon)[CountryRoads](/maintainers/CountryRoads)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/wutongshenyuan-qrcode-prettify/health.svg)

```
[![Health](https://phpackages.com/badges/wutongshenyuan-qrcode-prettify/health.svg)](https://phpackages.com/packages/wutongshenyuan-qrcode-prettify)
```

###  Alternatives

[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

205144.8k5](/packages/bezhansalleh-filament-google-analytics)[eightynine/filament-reports

Elegant reports in your filament application

9933.8k](/packages/eightynine-filament-reports)[bolt/assets

🛠 Javascript and CSS Assets used in Bolt's backend. Do not `require` directly.

10144.4k2](/packages/bolt-assets)

PHPackages © 2026

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