phpcolor/apple-colors

Apple Colors - PHP 颜色调色板

v0.1.2 2024-04-14 02:08 UTC

This package is auto-updated.

Last update: 2024-08-31 00:27:02 UTC


README

本包提供访问在 Apple 界面中使用的颜色调色板。

Apple Colors

安装

composer require phpcolor/apple-colors

使用

颜色调色板

use PhpColor\Colors\Apple\AppleColors as Apple;

$colors = Apple::iOS(); // iOS & iPadOS
$colors = Apple::macOS();
$colors = Apple::tvOS();
$colors = Apple::visionOS();
$colors = Apple::watchOS();

主题

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();

颜色名称

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'

颜色值

use PhpColor\Colors\Apple\AppleColors as Apple;

$colors = Apple::macOS();

echo $colors->blue;             // #007AFF
echo $colors->get('indigo');    // #5856D6

Apple Colors

致谢

本项目列出的颜色基于 Apple 使用的颜色。

许可证

PHPColor 包遵循 MIT 许可证 发布。