PHPackages                             foyyay/colorcast - 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. foyyay/colorcast

ActiveProject

foyyay/colorcast
================

Get tints and shades based on configuration data and a color hue.

1.0.0(7y ago)07MITPHPPHP &gt;=7.1

Since Sep 4Pushed 7y ago3 watchersCompare

[ Source](https://github.com/foyyay/php-colorcast)[ Packagist](https://packagist.org/packages/foyyay/colorcast)[ RSS](/packages/foyyay-colorcast/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

ColorCast
=========

[](#colorcast)

Given a configuration of hue points to named saturation and value entries you can provide a hue and the saturation and value will be interpolated and the resulting color returned as a hex string.

Install

```
composer require foyyay/colorcast;

```

Use

```
use Foyyay\ColorCast\ColorCast;

$caster = new ColorCast(config);
$colors = $caster->fromHue(90);
// or
$colors = $caster->fromColor('#87d936');

```

An example config could look like:

```
$config = [
    "0" => [
        "primary" => ["saturation" => 80, "value" => 70],
        "accent" => ["saturation" => 75, "value" => 85],
    ],
    "20" => [
        "primary" => ["saturation" => 40, "value" => 50],
        "accent" => ["saturation" => 80, "value" => 90],
    ],
];
```

So given a hue of 90 the you'll get back an array with two keys, "primary", and "accent". The hue for both colors will be 90, the saturation for primary will be 60 and the value will be 60.

You may add as many hue values from 0 to &lt; 360 as you want. You can add as many named configs as you want.

### Thank you.

[](#thank-you)

Bootstrapped using the [Composer Library Template](https://github.com/buonzz/composer-library-template).

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

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

Unknown

Total

1

Last Release

2804d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

composerpackagelibrarycolorhue

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/foyyay-colorcast/health.svg)

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

###  Alternatives

[codedungeon/php-cli-colors

Liven up you PHP Console Apps with standard colors

10210.1M26](/packages/codedungeon-php-cli-colors)[cybercog/laravel-paket

Composer personal web interface. Manage Laravel dependencies without switching to command line!

1753.3k](/packages/cybercog-laravel-paket)[wilianx7/php-recurring

PHP library to make getting dates easier when working with recurring tasks.

1045.0k](/packages/wilianx7-php-recurring)[foxrp/rippled-php

A PHP library for communication with rippled. (The XRP Ledger)

432.5k](/packages/foxrp-rippled-php)

PHPackages © 2026

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