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

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

ypho/colors
===========

Colors is a small package that contains 22 color palettes. Each palette has ten shades from light to dark.

1.1.1(4y ago)08MITPHPPHP ^8.0

Since Jan 4Pushed 4y ago1 watchersCompare

[ Source](https://github.com/ypho/colors)[ Packagist](https://packagist.org/packages/ypho/colors)[ RSS](/packages/ypho-colors/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Colors
======

[](#colors)

[![License](https://camo.githubusercontent.com/524112af5a2e26961e7fe07a3d35d46726ca32ce3af5a18e99544634b84501f9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7970686f2f636f6c6f7273)](https://camo.githubusercontent.com/524112af5a2e26961e7fe07a3d35d46726ca32ce3af5a18e99544634b84501f9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7970686f2f636f6c6f7273)[![GitHub Workflow Status](https://camo.githubusercontent.com/6e6aa097eb2c9b9b3b5141df0635d07ea012ecfc286cb8fb9adefe241118aad2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7970686f2f636f6c6f72732f496e7374616c6c6174696f6e253230262532305465737473)](https://camo.githubusercontent.com/6e6aa097eb2c9b9b3b5141df0635d07ea012ecfc286cb8fb9adefe241118aad2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7970686f2f636f6c6f72732f496e7374616c6c6174696f6e253230262532305465737473)[![Code Size](https://camo.githubusercontent.com/819d8fbf31c684f7aed353a9114c9edb40cefb7e50c1596462f6a6cc0a06a067/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f7970686f2f636f6c6f7273)](https://camo.githubusercontent.com/819d8fbf31c684f7aed353a9114c9edb40cefb7e50c1596462f6a6cc0a06a067/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f7970686f2f636f6c6f7273)[![Latest Release](https://camo.githubusercontent.com/44b0c46b354cccce8a78155410166309a751ff559d8beac44890ecd0f87308b6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f7970686f2f636f6c6f7273)](https://camo.githubusercontent.com/44b0c46b354cccce8a78155410166309a751ff559d8beac44890ecd0f87308b6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f7970686f2f636f6c6f7273)

Colors is a small package that contains 22 color palettes. Each palette has ten shades from light to dark. The colors are based on the [TailwindCSS](https://tailwindcss.com/docs/customizing-colors#default-color-palette) colors.

Installation
------------

[](#installation)

```
composer require ypho/colors
```

Usage
-----

[](#usage)

```
// Return given color
$regularRed = Color::getSingleColor('red'); // #ef4444

// Return given color, but a darker shade of red
$amazonGreen = Color::getSingleColor('green', 8); // #166534

// Returns a palette of 10 shades of the given color
$teal = Color::getColorPalette('teal'); // ['#f0fdfa' ... '#134e4a']

// Returns all colors, in a light shade
$lightColors = Color::getColorsByShade(2); // ['#e2e8f0' ... '#fecdd3']

// Same as above, but take only three colors
$trafficLight = Color::getColorsByShade(6, ['red', 'orange', 'green']); // ['#dc2626', '#f97316', '#22c55e']
```

Donations
---------

[](#donations)

[![BTC](https://camo.githubusercontent.com/b07db7254503fba017542234c2617cffd23cab1a2c34fc3a4d261566b5794ec5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4254432d6263317161663539307761366776677a687136307077657a396a70326e75703634336c6161736a37796c2d626c7565)](https://camo.githubusercontent.com/b07db7254503fba017542234c2617cffd23cab1a2c34fc3a4d261566b5794ec5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4254432d6263317161663539307761366776677a687136307077657a396a70326e75703634336c6161736a37796c2d626c7565)[![ETH](https://camo.githubusercontent.com/0fd05275ca357144fb500f0d7a6ae79f8d3dce8cdeaf55d481b000d6f73480cf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4554482d3078344235634139313838413535643243456236453737363542376632334563654633353330353331422d726564)](https://camo.githubusercontent.com/0fd05275ca357144fb500f0d7a6ae79f8d3dce8cdeaf55d481b000d6f73480cf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4554482d3078344235634139313838413535643243456236453737363542376632334563654633353330353331422d726564)

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.2% 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 ~0 days

Total

3

Last Release

1684d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1beed62e171411d8d12ed81f47a1c71b056a4748e39ec012bd8a6775419017d7?d=identicon)[Ypho](/maintainers/Ypho)

---

Top Contributors

[![ypho](https://avatars.githubusercontent.com/u/7271977?v=4)](https://github.com/ypho "ypho (20 commits)")[![XolphinIvo](https://avatars.githubusercontent.com/u/19650152?v=4)](https://github.com/XolphinIvo "XolphinIvo (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[lcinhk/flarum-ext-acgembed

Add acfun.cn and bilibili.com in mediaembed

161.2k](/packages/lcinhk-flarum-ext-acgembed)

PHPackages © 2026

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