A PHP client for the WhatColorIs REST API.
This library is made for the use with Composer. Add it to your project by running $ composer require whatcoloris/api-client.
Please note: this library requires you to have a valid API token.
Add you API token at first and initialize the client then:
<?php
use WhatColorIs\APIClient\ColorInformationLoader\WhatColorIsAPI;
WhatColorIsAPI::setApiKey('token');
$whatColorIsAPI = new WhatColorIsAPI();Request information about a specific color system:
<?php
use WhatColorIs\APIClient\Enum\ColorSystem;
$response = $whatColorIsAPI->requestColorSystem(ColorSystem::PANTONE());Request information about a specific color:
<?php
use WhatColorIs\APIClient\Enum\ColorSystem;
$response = $whatColorIsAPI->requestColorValue(ColorSystem::PANTONE(), 'PANTONE 215 C');You don't need to handle the response data by your own. The Bit&Black Colors library has a perfect integration and allows to handle the colors in an object-oriented way.
The available color systems are:
CIELABCMYKHEXHKSHSLPANTONERALRGB
If you have any questions, feel free to contact us under hello@bitandblack.com.
Further information about Bit&Black can be found under www.bitandblack.com.