tanxin-ui 0.4.5 → 0.4.7

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.
@@ -1757,6 +1757,17 @@ function colorPalette(color, index2) {
1757
1757
  ]);
1758
1758
  return rgbToStr(resRgb);
1759
1759
  }
1760
+ function colorHsl(color, index2) {
1761
+ const isLight2 = index2 <= 6;
1762
+ const rgb = strToRgb(color);
1763
+ const hsv = rgbToHsv(rgb);
1764
+ const i2 = isLight2 ? lightColorCount + 1 - index2 : index2 - lightColorCount - 1;
1765
+ return tinycolor({
1766
+ h: getHue(hsv[0], i2, isLight2),
1767
+ s: getSaturation(hsv[1], i2, isLight2),
1768
+ v: getValue$2(hsv[2], i2, isLight2)
1769
+ }).toHslString().replace(/hsl\((.*)\)/, "$1");
1770
+ }
1760
1771
  var SearchOutline = defineComponent({
1761
1772
  name: "SearchOutline",
1762
1773
  render() {
@@ -1919,6 +1930,7 @@ var Button = defineComponent({
1919
1930
  style["--color-5"] = colorPalette(color.value, 5);
1920
1931
  style["--color-6"] = colorPalette(color.value, 6);
1921
1932
  style["--color-7"] = colorPalette(color.value, 7);
1933
+ style["--color-1-hsl"] = colorHsl(color.value, 1);
1922
1934
  }
1923
1935
  return style;
1924
1936
  });