Is it possible to change the opacity/alpha value of a program window such as preview or chrome? I know this was possible in Linux by editing some gnome shell file. Is there anything similar in OS X
You can use afloat. This allows you to set the opacity of a window from the Window menu.
Edit: Dec 2018: It seems that a new replacement for Afloat is out called Deskovery, You should enter your email here to join the beta program: https://www.neomobili.com/products/deskovery/ And browse the blog to figure out which beta version you want: https://www.neomobili.com/blog/ Downloads for all versions of this app are kind of hidden here: https://www.neomobili.com/files/
The previously mentioned Afloat is not working anymore on El Capitan and Sierra since both deprecate applications using code injection techniques.
There seems to be no direct equivalent for this SIMBL using Afloat.
If you now need just a 'mock version', does a mock picture suffice your needs? These needs are a bit underdetermined.
However, you may find a number of possible alternatives available that might offer a somewhat similar functionality:
These are not tested as to whether they may be combinable.
The question is about setting the opacity for a single application, but to globally set transparency off, go to System Preferences -> Accessibility -> Display. Then make sure that "Reduce transparency" is selected. I found this here: https://www.tekrevue.com/tip/reduce-transparency-effects-os-x-yosemite/ for Yosemite, but it works in El Capitan.