How to include alpha channel to calculate color difference with Spatial CIELAB (S-CIELAB)?
21:51 03 Dec 2018

Of course I know how to convert RGB to LAB and LAB to RGB, color difference calculation is mentioned at https://en.wikipedia.org/wiki/Color_difference.
However, it does not mention anything about opacity. I would like to know how to convert RGBA to LAB with semi-transparent, just including the opacity into the CIELAB ΔE* formula.

Original image
Original image

Image converted to 256 colors with formula abs(R1 - R2) + abs(G1 - G2) + abs(B1 - B2) + abs(alpha1 - alpha2) as fitting function to select palette and dithering
Image converted to 256 colors by RGB

Image converted to 256 colors with formula abs(L1 - L2) + abs(a1 - a2) + abs(b1 - b2) + abs(alpha1 - alpha2) as fitting function to select palette and dithering
Image converted to 256 colors by CIELab

algorithm colors quantization