PHPackages                             michimani/text-to-color - 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. michimani/text-to-color

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

michimani/text-to-color
=======================

text-to-color is a simple php class for generating color code from text.

0.1.0(7y ago)019MITPHPPHP &gt;= 5.6.0

Since Jul 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/michimani/text-to-color)[ Packagist](https://packagist.org/packages/michimani/text-to-color)[ RSS](/packages/michimani-text-to-color/feed)WikiDiscussions master Synced today

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

text-to-color
=============

[](#text-to-color)

Generate color code from a string.

How to use
==========

[](#how-to-use)

1. install using composer

```
composer require michimani/text-to-color
```

and require the main file.

```
require_once('./txt2color.php');
```

2. create the object.

```
$t2c = new TextToColor();
```

3. call `generateColorHexFromString` function.

```
$str = 'some string';
$color = $t2c->generateColorHexFromString($str);

echo $color;

// #10b51f
```

Customize
=========

[](#customize)

If you want to change algorithm for generating color code, set some string to `$rand_str` in `TextToColor` class.

```
-  private $rand_str = 'some strings';
+  private $rand_str = 'other strings';
```

```
$str = 'some string';
$color = $t2c->generateColorHexFromString($str);

echo $color;

// #0cf465
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

2854d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/93c1dce4ecb4f8627780e11b83dfb57d89ec5e926ff86d58e18503cfac28aae2?d=identicon)[michimani](/maintainers/michimani)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/michimani-text-to-color/health.svg)

```
[![Health](https://phpackages.com/badges/michimani-text-to-color/health.svg)](https://phpackages.com/packages/michimani-text-to-color)
```

###  Alternatives

[data-values/time

Time value objects, parsers and formatters

10318.6k14](/packages/data-values-time)[gabrola/email-normalizer

A library that will normalize email addresses for cases when different email addresses all point towards a single email account

1979.8k](/packages/gabrola-email-normalizer)[mf/collections-php

Collections for PHP - It's basically a syntax sugar over classic array structure, which allows you to use it as classic array, but adds some cool features.

10103.3k7](/packages/mf-collections-php)[cobaltgrid/vatsim-stand-status

A PHP library to access the status of aircraft stands on VATSIM

188.7k](/packages/cobaltgrid-vatsim-stand-status)

PHPackages © 2026

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