class ColorPlugin extends AbstractPlugin
implements TabPluginInterface, ValuePluginInterface
{ public function renderValue(Value
$o): ?string
{ $r =
$o->
getRepresentation('color'
);
if (!
$r instanceof ColorRepresentation
) { return null;
} $children =
$this->renderer->
renderChildren($o);
$header =
$this->renderer->
renderHeader($o);
$header .= '<div class="kint-color-preview"><div style="background:';
$header .=
$r->
getColor(ColorRepresentation::COLOR_RGBA
);
$header .= '"></div></div>';
$header =
$this->renderer->
renderHeaderWrapper($o,
(bool) \
strlen($children),
$header);
return '<dl>'.
$header.
$children.'</dl>';
}