PHPackages                             todstoychev/websafe-colors - 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. todstoychev/websafe-colors

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

todstoychev/websafe-colors
==========================

Web safe colors generator

v0.1.1(10y ago)07231MITPHPPHP &gt;=5.4

Since Dec 2Pushed 10y ago1 watchersCompare

[ Source](https://github.com/todstoychev/websafe-colors)[ Packagist](https://packagist.org/packages/todstoychev/websafe-colors)[ Docs](https://github.com/todstoychev/websafe-colors)[ RSS](/packages/todstoychev-websafe-colors/feed)WikiDiscussions master Synced yesterday

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

This is a very simple composer package used to generate array with websafe color codes. It can generate both RGB and HEX codes.

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

[](#installation)

Simply use the usual composer way:

`composer require todstoychev/websafe-colors`

or add to your composer.json in the 'require' section:

```
    "require": {
        "todstoychev/websafe-colors": "dev-master"
    }
```

and run

`composer update`

Usage
=====

[](#usage)

The package contains only one class. You will need only the `Wsc::getColors()` method. This method accepts only one argument which defines the type of the produced codes. Default is false and the result is array with the hex formated codes. If you want to get RGB values use `true` as argument. The result in this case will be:

```
    [
        ['r' => 0, 'g' => 0, 'b' => 0],
        ['r' => 0, 'g' => 51, 'b' => 0],
        ['r' => 0, 'g' => 0, 'b' => 51],
        ...
    ]
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

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

Every ~23 days

Recently: every ~0 days

Total

6

Last Release

3749d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a4d5af278828b70e08928a5c1a6b33975cb9709ef0829d4822b5b083887a410f?d=identicon)[todstoychev](/maintainers/todstoychev)

---

Top Contributors

[![todstoychev](https://avatars.githubusercontent.com/u/4498971?v=4)](https://github.com/todstoychev "todstoychev (28 commits)")

---

Tags

generatorrgbhexcolor-codes

### Embed Badge

![Health badge](/badges/todstoychev-websafe-colors/health.svg)

```
[![Health](https://phpackages.com/badges/todstoychev-websafe-colors/health.svg)](https://phpackages.com/packages/todstoychev-websafe-colors)
```

###  Alternatives

[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k116.2M677](/packages/symfony-maker-bundle)[paragonie/constant_time_encoding

Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)

903351.6M180](/packages/paragonie-constant-time-encoding)[simplesoftwareio/simple-qrcode

Simple QrCode is a QR code generator made for Laravel.

2.9k29.5M106](/packages/simplesoftwareio-simple-qrcode)[spatie/color

A little library to handle color conversions

38220.5M34](/packages/spatie-color)[ozdemirburak/iris

PHP library for color manipulation and conversion.

1201.8M20](/packages/ozdemirburak-iris)[ssnepenthe/color-utils

A PHP library for performing SASS-like color manipulations.

631.2M16](/packages/ssnepenthe-color-utils)

PHPackages © 2026

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