I noticed that exporting a plot to PDF results in increased brightness relative to exporting the same plot to PNG.
Here are screenshots of a PDF and a PNG obtained from the same plot. As you can see, the picture above looks brighter than the one below.
Question. Is there a way to export to PDF while having the resulting picture look exactly as the corresponding PNG export?
I am using Mathematica 12.2.0 on a Mac (running macOS Monterey 12.5.1). To generate the plot and export the images I am using the code below.
SetDirectory[NotebookDirectory[]];
sphere[u_, v_] := {Cos[v] Cos[u], Cos[v] Sin[u], Sin[v]}
plot = ParametricPlot3D[
Evaluate[sphere[u, v]], {u, -Pi, Pi}, {v, -Pi/2, Pi/2},
PlotPoints -> 200, Mesh -> {30, 5}, MeshStyle -> Opacity[0.8],
PlotTheme -> {"Classic"}, Ticks -> None];
Export["sphere.pdf", plot];
Export["sphere.png", plot];
EDIT Aug 27, 2022. On my machine, exporting the PDF as suggested in Alexey Popkov's answer still results in a picture that looks brigther than the corresponding PNG (both with Preview and Adobe Acrobat Reader). If, on the other hand, I export the PDF by means of the Preview's export command, then the resulting PDF appears identical to the original PNG. Needless to say, I am puzzled.
EDIT Aug 29, 2022. The problem does not occur on the Windows computer in my office. So perhaps this is a macOS-related issue.