Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dracula Colors

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.

About

Dracula dark theme color palette for PHP

Topics

Resources

Code of conduct

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages