What are your color settings in Illustrator? and what ICC Profile is assigned to the document?
If, for instance, you are using Adobe RGB, PNGs get exported without an ICC profile (untagged), so are assumed (by PNG specifications) to be sRGB by anything you view it in that is not color managed: This would cause the difference you see viewing it in Preview.
You can however, embed a different profile with JPG export, checking the ICC Pofile box (
making sure the "Convert to sRGB" button is unchecked in the pulldown)
Thank You Brad! It works.
But I export PNG i get silly colors.
Do you think there is a solution for PNG?
You could use a certain ICC profile for your Document Color Profile in Illustrator.
Because Illustrator uses that profile when exporting to png, but does not embed it, you must assign that profile later in an application like Photoshop or Apple Preview.
If you truly want to emded an ICC profile export your file ("Export As") as JPG (or even better, something lossless like TIF), embedding the Adobe RGB ICC, then opening that in Photoshop and resaving as PNG there. PS allows you to embedded a profile in PNG files. This so no guarantee that your image's color space will be honoured across various applications and browsers, but for those that do, it's your best shot.
Otherwise, work in sRGB instead from the getgo, accepting the fact you may not be able to achieve that brilliant green which is outside sRGB's gamut.
The problem with exporting as jpeg or tiff is that you lose transparency.
Export as png, assign the profile in another app and save.
Indeed, but I don't think this is an issue for the OP
I would do that.
I create an action, that open an illustrator file and save it to PNG.
Actually the best way.