Skip to content
Viames Marino edited this page Feb 26, 2026 · 2 revisions

Pair framework: Color

Pair\Html\FormControls\Color renders <input type="color">.

Methods

  • render(): string
  • Inherited methods from FormControl: value(), id(), class(), title(), required(), disabled(), readonly().

Example

$color = (new \Pair\Html\FormControls\Color('themeColor'))
    ->value('#0ea5e9')
    ->title('Primary theme color');

echo $color->render();

Notes

HTML color input expects hex-like values (#RRGGBB).

See also: FormControl, Text.

Clone this wiki locally