innmind/colour 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

innmind/colour

最新稳定版本:4.3.0

Composer 安装命令:

composer require innmind/colour

包简介

Handle colours strictly

关键字:

README 文档

README

Build Status codecov Type Coverage

This library helps you build an object representation of a colour out of a string (all objects are immutable). You can easily extract any information out of the colors, transform their representation and modify the colours.

It supports these formats:

  • #39f
  • #39ff (last hexadecimal value for the alpha)
  • #3399ff
  • #3399ffff (last 2 hexadecimal values for the alpha)
  • rgb()
  • rgba()
  • hsl()
  • hsla()
  • device-cmyk()
  • literals (as defined by the W3C)

Installation

composer install innmind/colour

Usage

use Innmind\Colour\Colour;

$rgba = Colour::of('39f');
$hsla = Colour::of('hsl(210, 100%, 60%)');
$cmyka = Colour::of('device-cmyk(80%, 40%, 0%, 0%)');
$rgba = Colour::blue->toRGBA();

Each representation can be represented to the other two so you can always work with your preferred format.

统计信息

  • 总下载量: 51.16k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 4
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-09-09