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 2w 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 41% 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

2780d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18377700?v=4)[Kelvin Htat](/maintainers/Susros)[@Susros](https://github.com/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

[goat1000/svggraph

Generates SVG graphs

133890.0k3](/packages/goat1000-svggraph)[imagekit/imagekit

PHP library for Imagekit

46877.3k10](/packages/imagekit-imagekit)[gravatarphp/gravatar

Gravatar URL builder which is most commonly called as a Gravatar library

16653.6k2](/packages/gravatarphp-gravatar)

PHPackages © 2026

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