Older versions of Joomla were able to just use
JHtml::_('behavior.colorpicker'); and then have inputs with the class
minicolors minicolors-input to use a color picker.
That functionality no long exists in Joomla 4.x. The old Html\Behavior file mentions in a deprecation note that users should either switch to either the field or the layout for rendering. The issue I'm having is figuring out how exactly to go about this.
Thus far I have:
$color = new Joomla\CMS\Form\Field\ColorField(); $color->__set('name', 'debug'); echo $color->renderField();
Not only does that not feel like the correct method, but it also throws an error/warning:
Notice: Trying to access array offset on value of type null in /libraries/src/Form/FormField.php on line 834