PHPackages                             susros/colorbarcoder - 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. [Image &amp; Media](/categories/media)
4. /
5. susros/colorbarcoder

ActiveLibrary[Image &amp; Media](/categories/media)

susros/colorbarcoder
====================

ColorbarCoder is PHP class for encoding and decoding color barcode image.

v1.0.2(7y ago)516[1 issues](https://github.com/Susros/ColorbarCoder/issues)MITPHP

Since Nov 20Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Susros/ColorbarCoder)[ Packagist](https://packagist.org/packages/susros/colorbarcoder)[ RSS](/packages/susros-colorbarcoder/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (3)DependenciesVersions (2)Used By (0)

 [![ColorbarCoder](logo.jpg)](logo.jpg)

ColorbarCoder
=============

[](#colorbarcoder)

ColorbarCoder encodes the original text string to color codes and decode color codes from color bar image into its original text.

Documentation
=============

[](#documentation)

Full documentation: [Here](http://www.colorbarcoder.com/docs)

Installation
============

[](#installation)

ColorbarCoder can be downloaded manually or cloneed by using:

```
git clone git@github.com:Susros/ColorbarCoder.git

```

ColorbarCoder is also availabe on [Packagist](https://packagist.org/packages/susros/colorbarcoder). To install it with Composer, add this line to your `composer.json` file:

```
"susros/colorbarcoder" : "~1.0.2"

```

or run

```
composer require susros/colorbarcoder

```

Basic Usage
===========

[](#basic-usage)

Include ColorbarCoder if you are not using autoload.

```
include_once "path/to/ColorbarCoder.php";
use ColorbarCoder\ColorbarCoder;
```

Instantiate ColorbarCoder

```
$colorbarCoder = new ColorbarCoder();
```

Encode the text,

```
// Original text
$text = "This is awesome!";

// Encode the text
$colorbarCoder->encode($text);
```

Print the colorbar image,

```
$colorbarCoder->printColorbarImage(500, 500);
```

This will print out image with 500 x 500 dimention. The default image extension is PNG. JPG format can be created by declaring JPG in the parameter. However, only PNG works for decoding the color bar as JPG will reduce the quality and result in different color code. Therefore, the original text will not be accurate. It is recommended to use PNG instead.

[![alt text](https://github.com/Susros/ColorbarCoder/raw/master/test/img/5603e46d561cef1f6d00bdfebcd77742.png "This is awesome!")](https://github.com/Susros/ColorbarCoder/blob/master/test/img/5603e46d561cef1f6d00bdfebcd77742.png)

Decode the color bar image,

```
// Image file
$image = "./img/colorbar.png";

// Decode the image
$colorbarCoder->decode($image);
```

Print the decoded text,

```
echo $colorbarCoder->getText();
```

Output

```
This is awesome!

```

For more usages: [See here](http://www.colorbarcoder.com/docs/usage)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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

2734d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/75a77e9153a1135325b1deca82ab40f3a8bc35fb15451f0e8b43eb8927e73ffe?d=identicon)[Susros](/maintainers/Susros)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/susros-colorbarcoder/health.svg)

```
[![Health](https://phpackages.com/badges/susros-colorbarcoder/health.svg)](https://phpackages.com/packages/susros-colorbarcoder)
```

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[humanmade/tachyon-plugin

Rewrites WordPress image URLs to use Tachyon

87338.5k2](/packages/humanmade-tachyon-plugin)

PHPackages © 2026

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