phpcolor/dracula-colors

Dracula Colors - PHP Color Palette

Maintainers

Package info

github.com/phpcolor/dracula-colors

Homepage

pkg:composer/phpcolor/dracula-colors

Transparency log

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-08-22 08:02 UTC

This package is auto-updated.

Last update: 2026-08-22 08:27:17 UTC


README

This package provides access to the Dracula color palette, a dark theme for code editors and terminal applications.

Installation

composer require phpcolor/dracula-colors:^1.0

The package works standalone. Install phpcolor/phpcolor only when using palette():

composer require phpcolor/phpcolor

Usage

Create Colors Instance

use PhpColor\Colors\Dracula\DraculaColors as Dracula;

$colors = Dracula::colors();

Color Names

use PhpColor\Colors\Dracula\DraculaColors as Dracula;

$colors = Dracula::colors();

$names = $colors->getNames();
// 'background', 'currentLine', 'foreground', 'comment',
// 'cyan', 'green', 'orange', 'pink', 'purple', 'red', 'yellow'

Color Values

use PhpColor\Colors\Dracula\DraculaColors as Dracula;

$colors = Dracula::colors();

echo $colors->purple;             // #BD93F9
echo $colors->get('cyan');        // #8BE9FD

PHPColor Palette

use PhpColor\Color\Palette\ColorPaletteInterface;
use PhpColor\Colors\Dracula\DraculaColors as Dracula;

$palette = Dracula::colors()->palette();
assert($palette instanceof ColorPaletteInterface);

echo $palette->get('purple')->toHex(); // #bd93f9

Calling palette() without phpcolor/phpcolor installed throws a LogicException with the installation command.

Credits

The colors listed in this project are based on the Dracula Theme.

License

This PHPColor package is released under the MIT license.