ortic/color-converter
最新稳定版本:v0.1
Composer 安装命令:
composer require ortic/color-converter
包简介
color converter
README 文档
README
Helps you to convert between the various ways to define a color in CSS.
Examples
Assuming you've got a string resembling a color, just call the fromString method to get a color object back.
$color = Color::fromString('#ff0000');
The hex representation is not the only support schema:
$color = Color::fromString('red'); $color = Color::fromString('rgb(255, 0, 0)'); $color = Color::fromString('hsl(0, 100%, 50%)');
Once you have a color object you can get a HEX representation like this:
echo $color->toHex();
统计信息
- 总下载量: 4.4k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2017-05-09