PHPackages                             danielebuso/laravel-tailette - 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. danielebuso/laravel-tailette

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

danielebuso/laravel-tailette
============================

A Laravel package for generating Tailwind CSS color palettes

1.0.0(10mo ago)00MITPHPPHP ^8.0

Since Jun 25Pushed 10mo agoCompare

[ Source](https://github.com/danielebuso/laravel-tailette)[ Packagist](https://packagist.org/packages/danielebuso/laravel-tailette)[ RSS](/packages/danielebuso-laravel-tailette/feed)WikiDiscussions main Synced 1mo ago

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

Laravel Tailette
================

[](#laravel-tailette)

A Laravel package for generating Tailwind CSS color palettes from a base color.

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

[](#installation)

You can install the package via composer:

```
composer require danielebuso/laravel-tailette
```

The package will automatically register its service provider if you're using Laravel &gt;= 5.5 with package auto-discovery.

Publishing the config file
--------------------------

[](#publishing-the-config-file)

You can publish the config file with:

```
php artisan vendor:publish --tag="tailette-config"
```

This will publish the config file to `config/tailette.php` where you can modify the default settings:

```
return [
    // Default color palette (blue)
    'default_palette' => [
        '50' => '#eff6ff',
        '100' => '#dbeafe',
        // ...
    ],

    // Cache duration in minutes (1 day by default)
    'cache_duration' => 60 * 24,
];
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

```
use DanieleBuso\Tailette\Facades\Tailette;

// Generate a palette from a hex color (with or without #)
$palette = Tailette::generate('#3b82f6');
// or
$palette = Tailette::generate('3b82f6');

// The result is a collection with keys 50, 100, 200, ..., 950
// Each value is a hex color code
echo $palette['500']; // #3b82f6 (the original color)
echo $palette['200']; // A lighter shade
echo $palette['800']; // A darker shade
```

### Without Caching

[](#without-caching)

If you need to bypass the cache (for testing or other purposes):

```
$palette = Tailette::generatePalette('3b82f6');
```

### Using in Blade Templates

[](#using-in-blade-templates)

```

    This div has a background color of the base color

    This div has a background color of a lighter shade

```

### Using with Tailwind Config

[](#using-with-tailwind-config)

You can use this package to dynamically generate color palettes for your Tailwind config:

```
// tailwind.config.js
const colors = require('./colors.json');

module.exports = {
  theme: {
    extend: {
      colors: colors,
    },
  },
  // ...
}
```

Then in your Laravel application, you can generate the colors.json file:

```
$colors = [
    'primary' => Tailette::generate('#3b82f6')->toArray(),
    'secondary' => Tailette::generate('#10b981')->toArray(),
    // Add more colors as needed
];

file_put_contents(
    public_path('colors.json'),
    json_encode($colors, JSON_PRETTY_PRINT)
);
```

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance54

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

322d ago

### Community

Maintainers

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

---

Top Contributors

[![danielebuso](https://avatars.githubusercontent.com/u/6517317?v=4)](https://github.com/danielebuso "danielebuso (2 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/danielebuso-laravel-tailette/health.svg)

```
[![Health](https://phpackages.com/badges/danielebuso-laravel-tailette/health.svg)](https://phpackages.com/packages/danielebuso-laravel-tailette)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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