Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이수빈
/
Find_your_own_personal_color
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
starbucksdolcelatte
2019-05-14 14:13:49 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a8b13851241176f6c7bac19d99ad7f036a0be018
a8b13851
1 parent
a100e9d5
convert list for fuzzy logic algorithm
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletions
get_std_from_xls.py
get_std_from_xls.py
View file @
a8b1385
...
...
@@ -23,7 +23,7 @@ class ListFromExcel:
이 파이썬 코드는
엑셀에 정리된 색상 기준 값을 list로 변환하기 위해 작성되었으며
리스트는 아래와 같이 이루어져있다.
[standard_1[spr[r,g,b], smr[r,g,b], fal[r,g,b], wnt[r,g,b]]
.
[standard_1[spr[r,g,b], smr[r,g,b], fal[r,g,b], wnt[r,g,b]]
,
standard_2[spr[r,g,b], smr[r,g,b], fal[r,g,b], wnt[r,g,b]],
standard_3[spr[r,g,b], smr[r,g,b], fal[r,g,b], wnt[r,g,b]],
...
...
...
@@ -54,3 +54,35 @@ class ListFromExcel:
ret_list
.
append
([
list
[
i
][
5
:
8
],
list
[
i
][
14
:
17
],
list
[
i
][
23
:
26
],
list
[
i
][
32
:
35
]])
return
ret_list
def
convert_list
(
self
,
skin_list
,
hair_list
,
eye_list
):
'''
skin[standard_1[spr[r,g,b], smr[r,g,b], fal[r,g,b], wnt[r,g,b]],
standard_2[spr[r,g,b], smr[r,g,b], fal[r,g,b], wnt[r,g,b]],
...
standard_n[spr[r,g,b], smr[r,g,b], fal[r,g,b], wnt[r,g,b]]],
hair[], eye[]
를 아래와 같이 변환
spr[standard_1[skin[R,G,B], hair[R,G,B], eye[R,G,B]],
...
standard_n[skin[R,G,B], hair[R,G,B], eye[R,G,B]]],
smr[standard_1[skin[R,G,B], hair[R,G,B], eye[R,G,B]],
...
standard_n[skin[R,G,B], hair[R,G,B], eye[R,G,B]]],
...
wnt[standard_1[skin[R,G,B], hair[R,G,B], eye[R,G,B]],
...
standard_n[skin[R,G,B], hair[R,G,B], eye[R,G,B]]]]
주의: 매개변수 skin_list, hair_list, eye_list 길이 같아야 함
'''
ret
=
[]
temp
=
[]
for
s
in
range
(
4
):
#season
for
i
in
range
(
len
(
skin_list
)):
#standard
temp
.
append
([
skin_list
[
i
][
s
],
hair_list
[
i
][
s
],
eye_list
[
i
][
s
]])
ret
.
append
(
temp
)
temp
=
[]
for
x
in
ret
:
print
(
x
)
return
ret
...
...
Please
register
or
login
to post a comment