Skip to content

Repository files navigation

PHPColor - Colors

Repository for color palettes used in web interfaces.

Tailwind Colors

Installation

Install every palette package through the monorepo package:

composer require phpcolor/colors:^1.0

Each package also remains available independently.

Packages

Name Composer install Description
Apple phpcolor/apple-colors Apple color palettes & scales
Bootstrap phpcolor/bootstrap-colors Bootstrap 5 color palettes & scales
Dracula phpcolor/dracula-colors Dracula dark theme color palette
Material phpcolor/material-colors Material Design color palette
Nord phpcolor/nord-colors Nord arctic, north-bluish color scheme
Open Color phpcolor/open-color Open Color palette optimized for UI design
Pico phpcolor/pico-colors Pico CSS color palettes & scales
Primer phpcolor/primer-colors Primer color palettes & scales
Tailwind phpcolor/tailwind-colors Tailwind CSS color palettes & scales

PHPColor palettes

The packages work standalone and return hexadecimal strings through their existing APIs. The optional palette() methods return PhpColor\Color\Palette\ColorPaletteInterface objects:

composer require phpcolor/phpcolor
use PhpColor\Colors\Dracula\DraculaColors;
use PhpColor\Colors\Tailwind\TailwindColors;

$dracula = DraculaColors::colors()->palette();
$blue = TailwindColors::colors()->palette('blue');

echo $dracula->get('purple')->toHex();
echo $blue->get(500)->toHex();

phpcolor/phpcolor is suggested, not required. Calling palette() without it throws a LogicException with the installation command.

License

This PHPColor project is released under the MIT license.

About

PHP color palettes & scales (Bootstrap, Primer, Tailwind, Apple, ...)

Topics

Resources

Code of conduct

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages