ColorPickerType

This form class is responsible for creating a color picker field

Type options

Option Type Default value Description

Code example

$builder->add('color', ColorPickerType::class, [
    'required' => false,
    'label' => $this->trans('Color', 'Admin.Shopparameters.Feature'),
    'help' => $this->trans('Background color of this status label. Used both in backoffice and on order tracking page. HTML colors only.', 'Admin.Shopparameters.Help'),
])

Preview example

ColorPickerType rendered in form example