PHPackages                             neophp/colorpalette-package - 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. neophp/colorpalette-package

ActiveLibrary

neophp/colorpalette-package
===========================

Dev-only color palette generator and WCAG contrast checker for NeoPHP

v0.2.1(yesterday)03↑2900%MITCSSPHP &gt;=8.5CI passing

Since Aug 8Pushed yesterdayCompare

[ Source](https://github.com/NeoPHP-Dev/neo-colorpalette-package)[ Packagist](https://packagist.org/packages/neophp/colorpalette-package)[ RSS](/packages/neophp-colorpalette-package/feed)WikiDiscussions main Synced today

READMEChangelog (3)DependenciesVersions (4)Used By (0)

ColorPalette Package
====================

[](#colorpalette-package)

A dev-only color tool for NeoPHP: generate a full tint/shade scale from a base color, check WCAG contrast between two colors, and convert HEX/RGB/HSL live — entirely client-side.

---

Structure
---------

[](#structure)

```
colorpalette-package/
├── composer.json
├── README.md
└── src/
    ├── NeoColorPalettePackage.php
    ├── Middleware/
    │   └── DevOnlyMiddleware.php
    ├── Controllers/
    │   └── ColorPaletteController.php
    ├── Assets/
    │   ├── css/colorpalette.css
    │   └── js/colorpalette.js
    └── Templates/
        ├── components/
        │   └── ColorPalette.macro.html.twig
        └── pages/
            └── builder.html.twig

```

---

Dev-only, by design
-------------------

[](#dev-only-by-design)

The standalone page's route is protected by `DevOnlyMiddleware`, checking `Config/app.config.php`'s `environment` key. Outside `environment: dev`, it returns a blocked response.

The `ColorPalette` macro makes no server calls, so it has no such restriction built in — guard any page you embed it in yourself if it should stay dev-only in your project.

---

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

[](#installation)

```
php bin/neo package:require neophp/colorpalette-package --project=MyProject
```

Register it in the project's `Config/app.config.php`:

```
return [
    // ...
    'packages' => [
        \Vendor\NeoPHP\ColorPalettePackage\NeoColorPalettePackage::class,
    ],
];
```

No configuration file, no migration.

---

Usage
-----

[](#usage)

### Standalone page

[](#standalone-page)

Visit `/_colorpalette/` (only reachable in `dev`).

### Embedding in your own page

[](#embedding-in-your-own-page)

```
{% import '@ColorPalette/components/ColorPalette.macro.html.twig' as ColorPalette %}

{{ ColorPalette.render() }}

```

`ColorPalette.render(instanceId = 'cp')` accepts an optional `instanceId` to avoid collisions if rendered more than once on the same page.

---

What it provides
----------------

[](#what-it-provides)

### Color scale

[](#color-scale)

Enter a base color; a 10-step scale (50 → 900, Tailwind-style) is generated by varying lightness while keeping hue and saturation from your base color. Click any swatch to copy its hex code.

### Contrast checker

[](#contrast-checker)

Enter a foreground and background color; the tool computes the WCAG contrast ratio and shows whether it passes AA (4.5:1), AA Large (3:1), or AAA (7:1) — the same thresholds used by accessibility audits.

### Converter

[](#converter)

Enter a hex color and get its RGB and HSL equivalents instantly.

---

Theming
-------

[](#theming)

Every visual value is a CSS custom property scoped to `.cp-layout`:

```
.cp-layout {
    --cp-accent: #6366f1;
    --cp-bg: #161923;
    --cp-bg-alt: #1b2030;
    --cp-border: #2d3342;
    --cp-text: #e5e7eb;
    --cp-text-muted: #9ca3af;
}
```

---

License
-------

[](#license)

MIT

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance100

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.6% 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

1d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/212323688?v=4)[BBoezio](/maintainers/BenjiLeLoustik)[@BenjiLeLoustik](https://github.com/BenjiLeLoustik)

---

Top Contributors

[![BenjiLeLoustik](https://avatars.githubusercontent.com/u/212323688?v=4)](https://github.com/BenjiLeLoustik "BenjiLeLoustik (11 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

### Embed Badge

![Health badge](/badges/neophp-colorpalette-package/health.svg)

```
[![Health](https://phpackages.com/badges/neophp-colorpalette-package/health.svg)](https://phpackages.com/packages/neophp-colorpalette-package)
```

PHPackages © 2026

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