PHPackages                             badcow/palette - 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. badcow/palette

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

badcow/palette
==============

Library to handle colors and convert between different color spaces.

16PHP

Since Nov 30Pushed 11y ago1 watchersCompare

[ Source](https://github.com/samuelwilliams/Palette)[ Packagist](https://packagist.org/packages/badcow/palette)[ RSS](/packages/badcow-palette/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Palette
=======

[](#palette)

A library to represent colors and convert between different color spaces.

The library currently comprises of two classes: the `Converter` class, which converts colors from one space to another, and the `Color` class, which is an immutable object representation of a color.

Usage
-----

[](#usage)

To use the converter:

```
use Badcow\Palette\Converter;

$cmyk = Converter::rgbToCmyk([42, 53, 122, 0.3]); \\ array(65.6, 56.6, 0, 52.2)

```

To use the color class:

```
use Badcow\Palette\Color;

$sky_blue = new Color([43, 12, 0, 8], Color::CMYK);
print_r($sky_blue->rgb());

```

Warning!
--------

[](#warning)

This is still a work in progress. Be careful if you want to send it live!

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5dd5f6a3443d2ee5f0121397886a0141ba4f462d1a9686ba613de2815726b62f?d=identicon)[samuelwilliams](/maintainers/samuelwilliams)

---

Top Contributors

[![samuelwilliams](https://avatars.githubusercontent.com/u/806430?v=4)](https://github.com/samuelwilliams "samuelwilliams (3 commits)")

### Embed Badge

![Health badge](/badges/badcow-palette/health.svg)

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

PHPackages © 2026

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