@tetacom/ng-components 1.0.134 → 1.0.135
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/component/input/color-input/color-input.component.mjs +3 -3
- package/fesm2015/tetacom-ng-components.mjs +2 -2
- package/fesm2015/tetacom-ng-components.mjs.map +1 -1
- package/fesm2020/tetacom-ng-components.mjs +2 -2
- package/fesm2020/tetacom-ng-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -5299,10 +5299,10 @@ class ColorInputComponent {
|
|
|
5299
5299
|
onTouched() {
|
|
5300
5300
|
}
|
|
5301
5301
|
getHexColor(color) {
|
|
5302
|
-
if (color
|
|
5302
|
+
if (color && color.startsWith('rgb')) {
|
|
5303
5303
|
const value = color.substring(color.indexOf('(') + 1, color.lastIndexOf(')'));
|
|
5304
5304
|
const colorArray = value.split(',');
|
|
5305
|
-
|
|
5305
|
+
color = `#${('00' + parseInt(colorArray[0], 10).toString(16)).slice(-2)}${('00' + parseInt(colorArray[1], 10).toString(16)).slice(-2)}${('00' + parseInt(colorArray[2], 10).toString(16)).slice(-2)}`;
|
|
5306
5306
|
}
|
|
5307
5307
|
return color;
|
|
5308
5308
|
}
|