angular-material-components icon indicating copy to clipboard operation
angular-material-components copied to clipboard

ColorPicker: TypeError: c.toHexString

Open Ben555555 opened this issue 2 years ago • 3 comments

Whenever I try to open the color picker I get the following error:

TypeError: c.toHexString is not a function at set color [as color] (angular-material-components-color-picker.mjs:496:36)

<input matInput [ngxMatColorPicker]="picker" formControlName="color">
        <ngx-mat-color-toggle matSuffix [for]="picker"></ngx-mat-color-toggle>
        <ngx-mat-color-picker #picker ></ngx-mat-color-picker>

Version: 9.0.0 with Angular 15

Ben555555 avatar Jan 25 '23 13:01 Ben555555

Apparently it supports only Color typed value.

@author it would be nice if we could input a hex string directly as default value ?

iconBgColor: this.fb.control(new Color(255, 255, 255)), // default #FFFFFF (white)

will error if i use .hex or write "#fffffff"

Sharlaan avatar Jan 30 '23 12:01 Sharlaan

@h2qutc Any updates?

Yura13 avatar Jun 06 '23 17:06 Yura13