ImagickPixel::getColorAsString

Returns the color as a string

&reftitle.description; public `string` `ImagickPixel::getColorAsString`

Returns the color of the ImagickPixel object as a string.

&reftitle.parameters; &no.function.parameters;
&reftitle.returnvalues;

Returns the color of the ImagickPixel object as a string.

&reftitle.examples;

### Basic `Imagick::getColorAsString` usage

    <?php

    //Create an ImagickPixel with the predefined color 'brown'
    $color = new ImagickPixel('brown');

    $color->setColorValue(Imagick::COLOR_ALPHA, 64 / 256.0);

    $colorInfo = $color->getColorAsString();

    print_r($colorInfo);
    ?>

&example.outputs;

    rgb(165,42,42)

&reftitle.notes;

### Alpha not returned

This function does not return the alpha value of the color in the string.