2017 © Pedro Peláez
 

library colour

Handle colours strictly

image

innmind/colour

Handle colours strictly

  • Sunday, February 12, 2017
  • by Baptouuuu
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,075 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 11 % Grown

The README.md

Colour

Build Status codecov Type Coverage, (*1)

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., (*2)

It supports these formats:, (*3)

  • #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., (*4)

The Versions

12/02 2017

dev-master

9999999-dev http://github.com/Innmind/Colour

Handle colours strictly

  Sources   Download

MIT

The Requires

 

The Development Requires

colour

12/02 2017

2.0.0

2.0.0.0 http://github.com/Innmind/Colour

Handle colours strictly

  Sources   Download

MIT

The Requires

 

The Development Requires

colour

12/02 2017

dev-develop

dev-develop http://github.com/Innmind/Colour

Handle colours strictly

  Sources   Download

MIT

The Requires

 

The Development Requires

colour

09/09 2016

1.0.0

1.0.0.0 http://github.com/Innmind/Colour

Handle colours strictly

  Sources   Download

MIT

The Requires

 

colour