PHPackages                             mikealmond/twig-color-extension - 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. [Templating &amp; Views](/categories/templating)
4. /
5. mikealmond/twig-color-extension

ActiveProject[Templating &amp; Views](/categories/templating)

mikealmond/twig-color-extension
===============================

A series of Twig filters for color manipulations

v0.0.8(3y ago)8124.5k↓45.2%2MITPHPPHP &gt;=7.0CI failing

Since Nov 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mikealmond/twig-color-extension)[ Packagist](https://packagist.org/packages/mikealmond/twig-color-extension)[ Docs](https://github.com/mikealmond/twig-color-extension)[ RSS](/packages/mikealmond-twig-color-extension/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (6)Dependencies (4)Versions (9)Used By (0)

twig-color-extension
====================

[](#twig-color-extension)

[![Build Status](https://camo.githubusercontent.com/34a5eda8da0e8e2360da91da0e6b40ba0692287d7b7611b32fce0c6a0814f6dc/68747470733a2f2f7472617669732d63692e6f72672f6d696b65616c6d6f6e642f747769672d636f6c6f722d657874656e73696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mikealmond/twig-color-extension)[![Code Coverage](https://camo.githubusercontent.com/25603559dd50c4801066b22a80df8003a28d4243a61a26d042c0b3e514afdf6f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d696b65616c6d6f6e642f747769672d636f6c6f722d657874656e73696f6e2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mikealmond/twig-color-extension/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/781eefdbbaa2c6038c6ee1c0d77492ac32bc5caee1e7b4304e816d10c19f396e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d696b65616c6d6f6e642f747769672d636f6c6f722d657874656e73696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mikealmond/twig-color-extension/?branch=master)

This library will allow you to alter colors, check readability, and generate different palettes based on a base color.

Install
-------

[](#install)

Via Composer

```
$ composer require mikealmond/twig-color-extension
```

Usage
-----

[](#usage)

```
{{ '0099FF'|color_darken(20)|color_css_rgba(0.9) }}
{{ '0099FF' is color_dark ? 'dark' : 'light' }}
{{ '0099FF'|color_complementary(30)|color_css_hex }}
{{ '0099FF' is color_low_contrast ? 'default-color' : '0099FF'|color_css_hex }}

```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Mike Almond](https://github.com/mikealmond)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.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 ~199 days

Recently: every ~227 days

Total

8

Last Release

1402d ago

PHP version history (2 changes)v0.0.1PHP ~7.0

v0.0.8PHP &gt;=7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/600744?v=4)[Mike Almond](/maintainers/mikealmond)[@mikealmond](https://github.com/mikealmond)

---

Top Contributors

[![mikealmond](https://avatars.githubusercontent.com/u/600744?v=4)](https://github.com/mikealmond "mikealmond (11 commits)")[![demorose](https://avatars.githubusercontent.com/u/1484648?v=4)](https://github.com/demorose "demorose (1 commits)")[![EmilePerron](https://avatars.githubusercontent.com/u/9383532?v=4)](https://github.com/EmilePerron "EmilePerron (1 commits)")

---

Tags

colorphptwig-extensiontwig-filterwcag2twigcolorfiltermikealmond

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/mikealmond-twig-color-extension/health.svg)

```
[![Health](https://phpackages.com/badges/mikealmond-twig-color-extension/health.svg)](https://phpackages.com/packages/mikealmond-twig-color-extension)
```

###  Alternatives

[symfony/ux-twig-component

Twig components for Symfony

22018.6M379](/packages/symfony-ux-twig-component)[symfony/ux-live-component

Live components for Symfony

1647.0M136](/packages/symfony-ux-live-component)[symfony/ux-toolkit

A tool to easily create a design system in your Symfony app with customizable, well-crafted Twig components

16126.1k1](/packages/symfony-ux-toolkit)[mati365/ckeditor5-symfony

CKEditor 5 integration for Symfony

262.6k](/packages/mati365-ckeditor5-symfony)

PHPackages © 2026

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