pIvan / ngx-color-picker

Pure Angular color picker library.
MIT License
96 stars 16 forks source link

Typing in rgb values doesn't update the color #81

Open aleksander351 opened 5 months ago

aleksander351 commented 5 months ago

image

when setting the rgb values or the hsl values, nothing changes. Only when setting the hex string all 6 characters, does the color change.

The relevant code:

<chrome-picker [control]="colorControl">
  <div class="buttons">
    <button type="button" (click)="applyClick()">Apply</button>
  </div>
</chrome-picker>
this.colorControl.hidePresets().hideAlphaChannel();
this.colorControl.setValueFrom(color); // #ffffff

applyClick(): void {
  this.colorPicker.hide();
  this.colorChange.emit(colorControl.value.toHexString());
}

Nothing fancy here, just doesn't work like the demo example. Looks like the (inputChange) of the rgba-input-component and hsla-input-component doesn't work.

pIvan commented 5 months ago

rgb

image

image

image

Just tested with one of the components, can you give me more info and/or code examples? Thanks