meemup-library 1.1.86 → 1.1.87

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.
@@ -68,9 +68,12 @@ class ColorController {
68
68
  if (background_color === null || background_color.trim().toLowerCase() === "transparent") {
69
69
  return default_text_color;
70
70
  }
71
- // استفاده از متد generateContrastColorForHex برای رنگ‌های HEX
72
- if (/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/i.test(background_color.trim())) {
73
- return this.generateContrastColorForHex(background_color);
71
+ // // استفاده از متد generateContrastColorForHex برای رنگ‌های HEX
72
+ // if (/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/i.test(background_color.trim())) {
73
+ // return this.generateContrastColorForHex(background_color);
74
+ // }
75
+ if (background_color.trim().startsWith("#")) {
76
+ return this.generateContrastColorForRgb(this.hexWithAlphaToRgba(background_color));
74
77
  }
75
78
  // استفاده از متد generateContrastColorForRgb برای رنگ‌های RGB
76
79
  if (/^rgb\(/i.test(background_color)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meemup-library",
3
- "version": "1.1.86",
3
+ "version": "1.1.87",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",