Denis, the pinhole diam that gives the best result has a factor of wavelength multiplied by focal length in it. There are a few different versions of the criteria; Ralph pointed out in this thread two particular cases, from which I quote:
So if you pick a d and then collimate different wavelengths through it, the optimal FLs will be different. I.e. if you keep d constant across the wavelengths red, green, and blue, you'd need for the product wavelength * FL to be constant. Which means that a shorter (bluer) wavelength requires a longer FL, and a longer (redder) wavelengths requires a shorter FL.Originally Posted by Ralph
These formulas also show that if you want a large d, you need to go to a large FL.
That is my (latest) understanding of it, and I'd welcome further clarification from the experts.