On this page

View Helpers

FormColor

The FormColor view helper can be used to render a <input type="color"> HTML5 form input. It is meant to work with the color element.

Basic usage

use Laminas\Form\Element;

$element = new Element\Color('my-color');

// Within your view...
echo $this->formColor($element);

Output:

<input type="color" name="my-color" value="">