PHPackages                             shahonseven/php-color-hash - 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. shahonseven/php-color-hash

AbandonedArchivedLibrary

shahonseven/php-color-hash
==========================

Generate color based on the given string. Backported from the Javascript library color-hash

1.0.0(7y ago)1171.3k↓26.7%4[1 PRs](https://github.com/shahonseven/php-color-hash/pulls)MITPHPPHP &gt;=5.3.0

Since Jan 22Pushed 4y ago2 watchersCompare

[ Source](https://github.com/shahonseven/php-color-hash)[ Packagist](https://packagist.org/packages/shahonseven/php-color-hash)[ RSS](/packages/shahonseven-php-color-hash/feed)WikiDiscussions master Synced 1mo ago

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

PHP Color Hash
==============

[](#php-color-hash)

Generate color based on the given string. PHP Port of [ColorHash Javascript Library](https://github.com/zenozeng/color-hash).

**Requires 64-bit PHP build.**

Usage
-----

[](#usage)

### Composer

[](#composer)

```
composer require shahonseven/php-color-hash
```

#### Basic

[](#basic)

```
$colorHash = new Shahonseven\ColorHash();

// in HSL, Hue ∈ [0, 360), Saturation ∈ [0, 1], Lightness ∈ [0, 1]
$colorHash->hsl('Hello World'); // [ 225, 0.65, 0.35 ]

// in RGB, R, G, B ∈ [0, 255]
$colorHash->rgb('Hello World'); // [ 135, 150, 197 ]

// in HEX
$colorHash->hex('Hello World'); // '#8796c5'
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

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

2674d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/306fdc03f60d43bca80cc755d995615988c5a8ab3e200b53cfed612e6dc39291?d=identicon)[shahonseven](/maintainers/shahonseven)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/shahonseven-php-color-hash/health.svg)

```
[![Health](https://phpackages.com/badges/shahonseven-php-color-hash/health.svg)](https://phpackages.com/packages/shahonseven-php-color-hash)
```

PHPackages © 2026

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