Introduction to PDF color: Optical Illusions

Introduction to PDF color: Optical Illusions

When I first began putting together my color presentation, I knew that I wanted colorful eye-candy that also conveyed that color can be tricky. So I went on a hunt for color-based Optical Illusions.  I was inspired on this theme by Gianni Sarconne and Marie-Jo Waeber’s Puzzillusions book, although I did not reproduce any illusions from that book of theirs, I did reproduce a couple from their What Are You Looking At? book.  The bulk of these Illusions, I first encountered in Al Seckel’s  The Great Book of Optical Illusions and another came from his Supervisions: Geometric Optical Illusions.



This code creates a total of 12 rectangles, but uses only two colors: Black (0) and Gray (0.55).


Three rectangles,  the inner bar and the border use the same (0.55) Gray, and the other uses a black to white Axial Shading pattern.


A gray (0.5) background with white lines and black lines drawn on top of it, the hard part was figuring out the math for when to stop/restart the lines for the inner rectangle.


The math for determining when to show a white circle is atrocious; it’s only saving grace is that it works.


Essentially the same illusion as the previous one, but making clear that it’s not the shape of the circles that make the lines bulge.


The first illusion I reproduced, and the first illusion that I cut from my presentation as I was never entirely happy with it.


The “red” squares are actually orange; does that count as a social engineering hack?


The blue and the orange are DeviceRGB colors, but the “silver” is actually DeviceGray.


Here we are filling identically colored diamonds with an Axial Shading Pattern based on a Magenta to white(DeviceCMYK) Separation color.


The circle clip is supposed to make it less obvious that this is essentially the same illusion as above; the only other difference is Separation Color is based on a DeviceRGB Green at the top going to black on the bottom.


A very simple illustration of a primary color (or secondary color for the RGB colorspace) causing simultaneous contrast.


A slightly more involved example where yellow is a primary/secondary color that causes simultaneous contrast when paired with its near opposite on color wheel, but where the two combine together in the lines, the yellow becomes grayer and the simultaneous contrast lessens.


A transparent diamond that isn’t really there.


I don’t see blueish discs with this illusion; I end up seeing non-existent diagonals.  This was an interesting illusion to recreate as I used a line dash pattern to create the the cyan intersections.


One of the few illusions based on transparency; that part was easy, it was figuring out how to do the staircase pattern behind the transparent colored lines that was more challenging.

Leave a Reply

Your email address will not be published.