"A Javascript program to create images of color illusion by histogram compression in RGB"
made by Akiyoshi Kitaoka for ECVP2021 Showtime!

(2) Set the following values and press the button below.
  R min - max    G min - max    B min - max

(This transformed image can be downloaded by right-clicking on it.)

(original image)

For those who are still getting used to it:
  This program can automatically determine the best parameter for you! (though not perfect:D)
  Select the target color by clicking on the image above, and press the button below.

target color:    R   G   B
the color after change: R   G   B

Press the left button if all the histograms are not drawn.   magnification: x


This color illusion production program takes advantage of the fact that the human visual system behaves as if it is perceiving a distribution of RGB values that is corrected to be in the range of 0 to 255.


Kitaoka, A. (2019). Two types of spatial color mixtures and color illusions. EIP19 (Empirical Research in Psychology), Belgrade, Serbia, March 30, 2019. Presentation (html)

Shapiro, A., Hedjar, L., Dixon, E., & Kitaoka, A. (2018). Kitaoka's tomato: Two simple explanations based on information in the stimulus. i-Perception, 9(1), January-February, 1-9. PDF (open access)

other pre-prepared images

The address of this webpage is available from:



An electronic image is made up of pixels whose sub-pixels are RGB. Each of RGB has a value of 256 gradations, where '0' means the darkest and '255' means the brightest. In most cases, an image of an object or landscape contains all gradations from 0 to 255 for each of RGB. When the range of those gradations is narrowed, color illusion is likely to occur. My demo is a Javascript program that creates color illusion by manipulating the range of gradations of each of RGB. Here I name this manipulation 'histogram compression.' Suppose you have an image of red strawberries. The R gradations of the image are compressed downward, say from 0 to 128, and the G and B gradations are compressed upward, say from 128 to 255. Then, pixels of red hue disappear, but the strawberries will continue to look red. This is a kind of color constancy phenomenon, but it is also a color illusion in the sense that objects appear to be reddish even though there are no red hue pixels. In my demo, I designed it so that you can try images of various colors. The demo (shown below) is available to anyone who has access to the web. Enjoy!


(Staff only)