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. [Utility &amp; Helpers](/categories/utility)
4. /
5. shahonseven/php-color-hash

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

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

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

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

Since Jan 22Pushed 4y ago1 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 3d 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

33

—

LowBetter than 72% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

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

2720d 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)
```

###  Alternatives

[creagia/filament-code-field

A Filamentphp input field to edit or view code data.

57307.1k3](/packages/creagia-filament-code-field)[element119/module-indexer-deploy-config

A Magento 2 module that allows developers to lock indexer modes via deployment config.

35151.9k](/packages/element119-module-indexer-deploy-config)

PHPackages © 2026

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