This is a simple Matlab implementation of the chromadapt function presented in Matlab2017b. The function adjusts color balance of RGB image with chromatic adaptation based on different chromatic adaptation transforms (e.g., Bradford, von Kries, CAT2000).
Note: we assume that the input image in the standard RGB without applying tone mapping or any camera picture style (i.e., after applying the color correction matrix to get the XYZ values, we assume there is only gamma curve applied according to the standard RGB in Ref. [1,2].
 Anderson, Matthew, et al. "Proposal for a standard default color space for the internet—srgb." Color and imaging conference. Vol. 1996. No. 1. Society for Imaging Science and Technology, 1996.
 Ebner, Marc. "Color Constancy". Chichester, West Sussex: John Wiley & Sons, 2007.
 Johannes von Kries. Beitrag zur physiologie der gesichtsempfindung. Arch. Anat. Physiol, 2:505–524, 1878.
 King Man Lam. Metamerism and Colour Constancy. Ph. D. Thesis, University of Bradford, 1985.
 H Helson. Object-color changes from daylight to incandescent filament illumination. Illum. Engng., 47:35–42, 1957.
 Graham D Finlayson and Sabine Süsstrunk. Performance of a chromatic adaptation transform based on spectral sharpening. In Color and Imaging Conference, volume 2000, pages 49–55, 2000.
 Changjun Li, M Ronnier Luo, Bryan Rigg, and Robert WG Hunt. Cmc 2000 chromatic adaptation transform: Cmccat2000. Color Research & Application, 27(1):49–58, 2002.
Mahmoud Afifi (2019). chromadapt: Adjust color balance of RGB image with chromatic (https://www.mathworks.com/matlabcentral/fileexchange/66682-chromadapt-adjust-color-balance-of-rgb-image-with-chromatic), MATLAB Central File Exchange. Retrieved .
- Different chromatic adaptation transforms (CATs) were added: von Kries, XYZ scaling, Bradford, CAT2000, Sharp.