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

ActiveLibrary

phpcolor/primer-colors
======================

Primer Colors - PHP Color Palette

v0.2.0(2y ago)15MITPHPPHP &gt;=8.3

Since Apr 10Pushed 3mo agoCompare

[ Source](https://github.com/phpcolor/primer-colors)[ Packagist](https://packagist.org/packages/phpcolor/primer-colors)[ Docs](https://phpcolor.dev/)[ RSS](/packages/phpcolor-primer-colors/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (6)Used By (0)

Primer Colors
=============

[](#primer-colors)

This package provides access to the color palettes used in Primer CSS.

[![Primer Colors](Resources/colors.svg)](Resources/colors.svg)

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

[](#installation)

```
composer require phpcolor/primer-colors
```

Usage
-----

[](#usage)

### Color themes

[](#color-themes)

```
use PhpColor\Colors\Primer\PrimerColors as Primer;

$colors = Primer::colors();
$colors = Primer::colors('light');

$colors = Primer::colors('dark');
```

### Color names

[](#color-names)

```
use PhpColor\Colors\Primer\PrimerColors as Primer;

$colors = Primer::colors();

$names = $colors->getNames();
// 'gray', 'blue', 'green', 'yellow', 'orange',
// 'red', 'purple', 'pink', 'coral'
```

### Color shades

[](#color-shades)

```
use PhpColor\Colors\Primer\PrimerColors as Primer;

$colors = Primer::colors();

$shades = $colors->getShades();
// 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
```

### Color values

[](#color-values)

```
use PhpColor\Colors\Primer\PrimerColors as Primer;

$colors = Primer::colors();

echo $colors->coral;           // #C4432B
echo $colors->coral();         // #C4432B
echo $colors->coral(5)         // #C4432B

echo $colors->get('coral');    // #C4432B
echo $colors->get('coral', 5); // #C4432B
```

---

[![Primer Colors](Resources/colors.svg)](Resources/colors.svg)

Credits
-------

[](#credits)

The colors listed in this project are based on the colors used by [Primer](https://primer.style).

License
-------

[](#license)

This [PHPColor](https://phpcolor.dev) package is released under the [MIT license](LICENSE).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance54

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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 ~1 days

Total

5

Last Release

762d ago

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/a798e0337c09608ab5c3d78d5bd120490a8e8689c4ef026bea27cfc136c7d60c?d=identicon)[raphael-geffroy](/maintainers/raphael-geffroy)

---

Top Contributors

[![smnandre](https://avatars.githubusercontent.com/u/1359581?v=4)](https://github.com/smnandre "smnandre (8 commits)")

---

Tags

colorcolorsgithubpalettephpprimeprimerscalecolorgithubscalethemepaletteprimer

### Embed Badge

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

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

###  Alternatives

[league/color-extractor

Extract colors from an image as a human would do.

1.3k4.7M18](/packages/league-color-extractor)[ksubileau/color-thief-php

Grabs the dominant color or a representative color palette from an image.

6353.8M37](/packages/ksubileau-color-thief-php)[brianmcdo/image-palette

Extracts colors from an image and generates a color palette against a whitelist of colors.

179209.0k2](/packages/brianmcdo-image-palette)[lukapeharda/tailwindcss-color-palette-generator

Generate TailwindCSS color palette from a single color.

22102.1k1](/packages/lukapeharda-tailwindcss-color-palette-generator)[marijnvdwerf/material-palette

Prominent image colour extraction for PHP

2952.9k](/packages/marijnvdwerf-material-palette)[presseddigital/colorit

A slick color picker fieldtype plugin for the Craft CMS 3 control panel.

2132.1k](/packages/presseddigital-colorit)

PHPackages © 2026

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