I can't zoom in on the picture, but what I see is bleeding from one color into the next along the diagonals (most evident in the green to blue and purple to red transitions). Are you saying that they are not there when you zoom in? I would think that because there is a gradient in the color transition, the gradient has to be emphasized in an angled meeting, more pronounced the sharper the angle (e.g.if it were a triangle, the angle would be 120° as opposed to 90°). It's not an optical illusion.
In short, you see two transecting lines on the diagonal because they are strongly suggested. The mind sees this accurately and reads the suggestion.
It is kind of like asking, why, in the following picture, do I read all the dotted lines as lines, where only two of them are actually solid lines?
Or, if you will, why do I see curves here?
Because the color differences in the offset squares are really there, suggesting a familiar curve, though in this question, it would be fair to ask Why do the curves appear smooth? In fact, the curves are not smooth.
If you do want to see interesting optical phenomenons,
stare at the center of your image for 30 seconds, then scroll down to the blank area next to my diagrams. You will see squares of reciprocal colors not in your original (like a bright yellow.) Also interesting is that as the image fades, blinking will "refresh" it.
after staring directly at the center for a minute or two, switch the focus very slightly to one side then back; you'll be pleasantly surprised by bursts of vibrant color parallel to each other each time you change.
Edited to add: This may be an optical illusion, but if it is, I'm unsure of what type it is. Looking at the zoomed image, clearly the impression is that there is some bleeding, but that's not the reality. Sorry I can't help more on this one. But it does get much more intriguing!
PhotoImage
intkinter
in Python, assigned each pixel one by one, creating the bigger square first then smaller and smaller (not very efficient, but pretty to watch it being built) then saved it as a png withPhotoImage.write
, I don't know the compression or anything else, I left it by default. $\endgroup$