TwistPHP Documentation

normalizeColor

File path: dist/twist/Core/Models/Image/Image.model.php
Namespace: Twist\Core\Models\Image
Extends:

normalizeColorConverts a hex color value to its RGB equivalent, you can pass in a Hex color string, array(red, green, blue) or array(red, green, blue, alpha).
Red,Green,Blue must be integers between 0-255 and Alpha must be an integer between 0-127

Parameters

Name Type Description
$mxdColourmixedn/a

Return Values

void — No return information has been documented for this function.

Example

<?php
//Set the variables for the example
$mxdColour 'foo-123';

//Call the function normalizeColor with the example vars
$resImage = new \Twist\Core\Models\Image\Image();
$resImage -> normalizeColor($mxdColour);