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-17 03:34:43 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b2bc2f849a34404f3a7383517f94991884c48248
b2bc2f84
1 parent
c7ed745c
RGB to Lab conversion with Colormath library
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
color_conversion.py
color_conversion.py
0 → 100644
View file @
b2bc2f8
from
colormath.color_objects
import
LabColor
,
sRGBColor
from
colormath.color_conversions
import
convert_color
#sRGB 클래스 인스턴스 생성. RGB 값을 넣을 때 is_upscaled=True로 해줘야 함
rgb
=
sRGBColor
(
222.5
,
201.4
,
188.9
,
is_upscaled
=
True
)
print
(
rgb
)
#lab로 변환. through_rgb_type=sRGBColor 로 넣어준다.(AdobeRGBColor클래스 사용 X)
lab
=
convert_color
(
rgb
,
LabColor
,
through_rgb_type
=
sRGBColor
)
print
(
lab
)
Please
register
or
login
to post a comment