xython 4.5.6__tar.gz → 4.5.7__tar.gz
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.
- {xython-4.5.6/src/xython.egg-info → xython-4.5.7}/PKG-INFO +1 -1
- {xython-4.5.6 → xython-4.5.7}/pyproject.toml +1 -1
- {xython-4.5.6 → xython-4.5.7}/src/xython/xy_color.py +3 -108
- {xython-4.5.6 → xython-4.5.7}/src/xython/xy_edge.py +3 -0
- {xython-4.5.6 → xython-4.5.7}/src/xython/xy_excel.py +134 -122
- {xython-4.5.6 → xython-4.5.7}/src/xython/xy_outlook.py +1 -1
- {xython-4.5.6 → xython-4.5.7}/src/xython/xy_re.py +37 -4
- {xython-4.5.6 → xython-4.5.7}/src/xython/xy_time.py +19 -19
- {xython-4.5.6 → xython-4.5.7}/src/xython/xy_util.py +17 -17
- {xython-4.5.6 → xython-4.5.7}/src/xython/xy_word.py +13 -13
- {xython-4.5.6 → xython-4.5.7/src/xython.egg-info}/PKG-INFO +1 -1
- {xython-4.5.6 → xython-4.5.7}/MANIFEST.in +0 -0
- {xython-4.5.6 → xython-4.5.7}/README.md +0 -0
- {xython-4.5.6 → xython-4.5.7}/requirements.txt +0 -0
- {xython-4.5.6 → xython-4.5.7}/setup.cfg +0 -0
- {xython-4.5.6 → xython-4.5.7}/src/xython/__init__.py +0 -0
- {xython-4.5.6 → xython-4.5.7}/src/xython/xy_auto.py +0 -0
- {xython-4.5.6 → xython-4.5.7}/src/xython/xy_chrome.py +0 -0
- {xython-4.5.6 → xython-4.5.7}/src/xython/xy_common.py +0 -0
- {xython-4.5.6 → xython-4.5.7}/src/xython/xy_db.py +0 -0
- {xython-4.5.6 → xython-4.5.7}/src/xython/xy_excel_event.py +0 -0
- {xython-4.5.6 → xython-4.5.7}/src/xython/xy_hwp.py +0 -0
- {xython-4.5.6 → xython-4.5.7}/src/xython/xy_list.py +0 -0
- {xython-4.5.6 → xython-4.5.7}/src/xython/xy_map.py +0 -0
- {xython-4.5.6 → xython-4.5.7}/src/xython.egg-info/SOURCES.txt +0 -0
- {xython-4.5.6 → xython-4.5.7}/src/xython.egg-info/dependency_links.txt +0 -0
- {xython-4.5.6 → xython-4.5.7}/src/xython.egg-info/requires.txt +0 -0
- {xython-4.5.6 → xython-4.5.7}/src/xython.egg-info/top_level.txt +0 -0
|
@@ -1510,81 +1510,6 @@ class xy_color:
|
|
|
1510
1510
|
|
|
1511
1511
|
return [R, G, B]
|
|
1512
1512
|
|
|
1513
|
-
def hsl_to_rgb(self, input_hsl):
|
|
1514
|
-
"""
|
|
1515
|
-
input_hsl을 rgb로 변경
|
|
1516
|
-
|
|
1517
|
-
:param input_hsl: [h,s,l]형식의 값
|
|
1518
|
-
:return:
|
|
1519
|
-
"""
|
|
1520
|
-
h, s, l = input_hsl
|
|
1521
|
-
|
|
1522
|
-
h = float(h / 360)
|
|
1523
|
-
s = float(s / 100)
|
|
1524
|
-
l = float(l / 100)
|
|
1525
|
-
|
|
1526
|
-
if s == 0:
|
|
1527
|
-
R = l * 255
|
|
1528
|
-
G = l * 255
|
|
1529
|
-
B = l * 255
|
|
1530
|
-
|
|
1531
|
-
if l < 0.5:
|
|
1532
|
-
temp1 = l * (1 + s)
|
|
1533
|
-
else:
|
|
1534
|
-
temp1 = l + s - l * s
|
|
1535
|
-
|
|
1536
|
-
temp2 = 2 * l - temp1
|
|
1537
|
-
|
|
1538
|
-
# h = h / 360
|
|
1539
|
-
|
|
1540
|
-
tempR = h + 0.333
|
|
1541
|
-
tempG = h
|
|
1542
|
-
tempB = h - 0.333
|
|
1543
|
-
|
|
1544
|
-
if tempR < 0: tempR = tempR + 1
|
|
1545
|
-
if tempR > 1: tempR = tempR - 1
|
|
1546
|
-
if tempG < 0: tempG = tempG + 1
|
|
1547
|
-
if tempG > 1: tempG = tempG - 1
|
|
1548
|
-
if tempB < 0: tempB = tempB + 1
|
|
1549
|
-
if tempB > 1: tempB = tempB - 1
|
|
1550
|
-
|
|
1551
|
-
if 6 * tempR < 1:
|
|
1552
|
-
R = temp2 + (temp1 - temp2) * 6 * tempR
|
|
1553
|
-
else:
|
|
1554
|
-
if 2 * tempR < 1:
|
|
1555
|
-
R = temp1
|
|
1556
|
-
else:
|
|
1557
|
-
if 3 * tempR < 2:
|
|
1558
|
-
R = temp2 + (temp1 - temp2) * (0.666 - tempR) * 6
|
|
1559
|
-
else:
|
|
1560
|
-
R = temp2
|
|
1561
|
-
|
|
1562
|
-
if 6 * tempG < 1:
|
|
1563
|
-
G = temp2 + (temp1 - temp2) * 6 * tempG
|
|
1564
|
-
else:
|
|
1565
|
-
if 2 * tempG < 1:
|
|
1566
|
-
G = temp1
|
|
1567
|
-
else:
|
|
1568
|
-
if 3 * tempG < 2:
|
|
1569
|
-
G = temp2 + (temp1 - temp2) * (0.666 - tempG) * 6
|
|
1570
|
-
else:
|
|
1571
|
-
G = temp2
|
|
1572
|
-
if 6 * tempB < 1:
|
|
1573
|
-
B = temp2 + (temp1 - temp2) * 6 * tempB
|
|
1574
|
-
else:
|
|
1575
|
-
if 2 * tempB < 1:
|
|
1576
|
-
B = temp1
|
|
1577
|
-
else:
|
|
1578
|
-
if 3 * tempB < 2:
|
|
1579
|
-
B = temp2 + (temp1 - temp2) * (0.666 - tempB) * 6
|
|
1580
|
-
else:
|
|
1581
|
-
B = temp2
|
|
1582
|
-
R = int(abs(round(R * 255, 0)))
|
|
1583
|
-
G = int(abs(round(G * 255, 0)))
|
|
1584
|
-
B = int(abs(round(B * 255, 0)))
|
|
1585
|
-
|
|
1586
|
-
return [R, G, B]
|
|
1587
|
-
|
|
1588
1513
|
def hsl_to_rgb_by_4_tetra_style(self, input_hsl):
|
|
1589
1514
|
"""
|
|
1590
1515
|
4가지 꼭지의 rgb값
|
|
@@ -1689,9 +1614,6 @@ class xy_color:
|
|
|
1689
1614
|
result = self.rgb_to_rgbint(rgb)
|
|
1690
1615
|
return result
|
|
1691
1616
|
|
|
1692
|
-
def hsl_to_rgbint(self, input_hsl):
|
|
1693
|
-
return self.hsl_to_rgbint(input_hsl)
|
|
1694
|
-
|
|
1695
1617
|
def hsv_to_rgb(self, input_hsv):
|
|
1696
1618
|
"""
|
|
1697
1619
|
HSV → RGB 변환
|
|
@@ -1742,8 +1664,8 @@ class xy_color:
|
|
|
1742
1664
|
입력된 자료의 형태가, xcolor형식인지를 확인하는 것
|
|
1743
1665
|
"""
|
|
1744
1666
|
rex = xy_re.xy_re()
|
|
1745
|
-
result1 = rex.
|
|
1746
|
-
result2 = rex.
|
|
1667
|
+
result1 = rex.is_fullmatch(str(input_xcolor), "[한글&영어:2~10][숫자:0~7]")
|
|
1668
|
+
result2 = rex.is_fullmatch(str(input_xcolor), "[한글&영어:2~10][+-:0~7]")
|
|
1747
1669
|
if result1:
|
|
1748
1670
|
result = result1
|
|
1749
1671
|
elif result2:
|
|
@@ -1957,7 +1879,7 @@ class xy_color:
|
|
|
1957
1879
|
|
|
1958
1880
|
if not color_dict: # 사전값이 없을때 기본으로 사전을 만드는것
|
|
1959
1881
|
color_dict = {}
|
|
1960
|
-
l1d = self.
|
|
1882
|
+
l1d = self.get_12_color_kor()
|
|
1961
1883
|
for color_name in l1d:
|
|
1962
1884
|
for no in range(1, 100):
|
|
1963
1885
|
xcolor = color_name + str(no)
|
|
@@ -2055,9 +1977,6 @@ class xy_color:
|
|
|
2055
1977
|
|
|
2056
1978
|
return [int(h), int(s * 100), int(l * 100)]
|
|
2057
1979
|
|
|
2058
|
-
def rgb_to_hsl(self, input_rgb):
|
|
2059
|
-
return self.rgb_to_hsl(input_rgb)
|
|
2060
|
-
|
|
2061
1980
|
def rgb_to_hsv(self, input_rgb):
|
|
2062
1981
|
"""
|
|
2063
1982
|
RGB → HSV 변환 (포토샵 등에서 사용하는 방식)
|
|
@@ -2162,9 +2081,6 @@ class xy_color:
|
|
|
2162
2081
|
hsl = self.rgb_to_hsl(rgb)
|
|
2163
2082
|
return hsl
|
|
2164
2083
|
|
|
2165
|
-
def rgbint_to_hsl(self, input_rgbint):
|
|
2166
|
-
return self.rgbint_to_hsl(input_rgbint)
|
|
2167
|
-
|
|
2168
2084
|
def rgbint_to_rgb(self, input_rgbint):
|
|
2169
2085
|
"""
|
|
2170
2086
|
정수형태의 int값을 [r,g,b]의 리스트형태로 바꾸는 것
|
|
@@ -2177,9 +2093,6 @@ class xy_color:
|
|
|
2177
2093
|
result = [namuji1, mok1, mok0]
|
|
2178
2094
|
return result
|
|
2179
2095
|
|
|
2180
|
-
def rgbint_to_rgb(self, input_rgbint):
|
|
2181
|
-
return self.rgbint_to_rgb(input_rgbint)
|
|
2182
|
-
|
|
2183
2096
|
def rotate_hue(self, input_rgb, degrees):
|
|
2184
2097
|
"""
|
|
2185
2098
|
색상(Hue)을 degrees 만큼 회전
|
|
@@ -2337,12 +2250,6 @@ class xy_color:
|
|
|
2337
2250
|
hsl_list = self.rgbint_to_hsl(input_l1d[6])
|
|
2338
2251
|
return hsl_list
|
|
2339
2252
|
|
|
2340
|
-
def to_hsl(self, input_xcolor):
|
|
2341
|
-
"""
|
|
2342
|
-
사용의 편의성을 위해 만듦
|
|
2343
|
-
"""
|
|
2344
|
-
return self.to_hsl(input_xcolor)
|
|
2345
|
-
|
|
2346
2253
|
def to_hsl(self, input_xcolor):
|
|
2347
2254
|
"""
|
|
2348
2255
|
입력된 자료를 기준으로 hsl값을 돌려주는것
|
|
@@ -2401,12 +2308,6 @@ class xy_color:
|
|
|
2401
2308
|
result.append(temp)
|
|
2402
2309
|
return result
|
|
2403
2310
|
|
|
2404
|
-
def to_rgb(self, input_xcolor):
|
|
2405
|
-
"""
|
|
2406
|
-
사용의 편의성을 위해 만듦
|
|
2407
|
-
"""
|
|
2408
|
-
return self.to_rgb(input_xcolor)
|
|
2409
|
-
|
|
2410
2311
|
def to_rgb(self, input_xcolor):
|
|
2411
2312
|
"""
|
|
2412
2313
|
xcolor값을 rgb값으로 변경
|
|
@@ -2587,12 +2488,6 @@ class xy_color:
|
|
|
2587
2488
|
result.append(1.0)
|
|
2588
2489
|
return result
|
|
2589
2490
|
|
|
2590
|
-
def to_rgbint(self, input_xcolor):
|
|
2591
|
-
"""
|
|
2592
|
-
사용의 편의성을 위해 만듦
|
|
2593
|
-
"""
|
|
2594
|
-
return self.to_rgbint(input_xcolor)
|
|
2595
|
-
|
|
2596
2491
|
def to_rgbint(self, input_xcolor):
|
|
2597
2492
|
"""
|
|
2598
2493
|
xcolor값을 rgbint로 변경
|