phpcolor / apple-colors
Apple Colors - PHP Color Palette
v0.1.2
2024-04-14 02:08 UTC
Requires
- php: >=8.3
README
This package provides access to the color palettes used in Apple interfaces.
Installation
composer require phpcolor/apple-colors
Usage
Color Palettes
use PhpColor\Colors\Apple\AppleColors as Apple; $colors = Apple::iOS(); // iOS & iPadOS $colors = Apple::macOS(); $colors = Apple::tvOS(); $colors = Apple::visionOS(); $colors = Apple::watchOS();
Themes
use PhpColor\Colors\Apple\AppleColors as Apple; $colors = Apple::macOS('light'); $colors = Apple::macOS('dark'); $colors = Apple::iOS('light'); $colors = Apple::iOS('dark'); // visionOS has only one theme $colors = Apple::visionOS();
Color names
use PhpColor\Colors\Apple\AppleColors as Apple; $colors = Apple::watchOS(); $names = $colors->getNames(); // 'red', 'orange', 'yellow', 'green', 'mint', 'teal', 'cyan', // 'blue', 'indigo', 'purple', 'pink', 'brown', 'gray'
Color values
use PhpColor\Colors\Apple\AppleColors as Apple; $colors = Apple::macOS(); echo $colors->blue; // #007AFF echo $colors->get('indigo'); // #5856D6
Credits
The colors listed in this project are based on the colors used by Apple.
License
This PHPColor package is released under the MIT license.