[Color Picker] Feature/lab color representation (#12935)

* Created logic to convrt RGB to CIELAB (with intermediate step to CIEXYZ)

* Added CIELAB to the available color representation types

* Created tests for the color conversion from RGB to LAB (and for RGB to XYZ)

* Update ColorPickerViewModel to keep the L*a*b* format the same

* Improved variable names & comment

* Remove url from color converting website to avoid unnecessary license issues

* Removed typo of the wrong variable

* Added expected words into dictionary

* Added links to explain used formulas

* Added CIE XYZ color space

* Added 'SRGB' to the dictionary

* Updated the range for the X and Z value in the CIE XYZ color space comments

* Fixed XYZ to LAB calculations

* Changed output format for CIELAb

Changed L*a*b*(L,a,b) to CIELab(L,a,b)

* Changed output in tests

* Fixed tests

* Added extra accuracy

* Add decimal places to cielab and ciexyz formats

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
This commit is contained in:
Ruben Fricke
2021-09-24 17:54:44 +02:00
committed by GitHub
parent 88e24263cf
commit 3358fd9b02
8 changed files with 259 additions and 1 deletions

View File

@@ -230,10 +230,13 @@ CHILDACTIVATE
CHILDWINDOW
chrdavis
chrisharris
chromaticities
chrono
Chrzan
chrzan
CHT
cielab
CIEXYZ
CImage
cinttypes
cla
@@ -289,6 +292,7 @@ comhost
cominterop
commandline
commctrl
companding
Compat
COMPOSITIONFULL
comsupp
@@ -403,6 +407,7 @@ ddd
ddee
ddf
Deact
debian
DECLAR
declspec
decltype
@@ -1265,6 +1270,7 @@ mii
MIIM
millis
mimetype
mindaro
Minimizeallwindows
MINIMIZEBOX
miniz
@@ -1958,6 +1964,7 @@ SRCCOPY
sre
sregex
SResize
SRGB
srme
srre
srw