Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public color7: string = '#f200bd';
public color8: string = '#a8ff00';
public color9: string = '#278ce2';
public color10: string = '#0a6211';
public color11: string = '#f2ff00';
public color12: string = '#f200bd';
public color13: string = 'rgba(0,255,0,0.5)';
public color14: string = 'rgb(0,255,255)';
public color15: string = 'rgb(255,0,0)';
public color16: string = '#a51ad633';
public color17: string = '#666666';
public color18: string = '#ff0000';
public cmykValue: string = '';
public cmykColor: Cmyk = new Cmyk(0, 0, 0, 0);
constructor(public vcRef: ViewContainerRef, private cpService: ColorPickerService) {}
public onEventLog(event: string, data: any): void {
console.log(event, data);
}
public onChangeColor(color: string): void {
console.log('Color changed:', color);
}
public onChangeColorCmyk(color: string): Cmyk {
const hsva = this.cpService.stringToHsva(color);
if (hsva) {
const rgba = this.cpService.hsvaToRgba(hsva);
public onChangeColorCmyk(color: string): Cmyk {
const hsva = this.cpService.stringToHsva(color);
if (hsva) {
const rgba = this.cpService.hsvaToRgba(hsva);
return this.cpService.rgbaToCmyk(rgba);
}
return new Cmyk(0, 0, 0, 0);
}