Left: using embedded ICC profile
Right: not using the embedded ICC profile and assuming its sRGB.
Yes, they can appear in JPEG (rarely), PNG (often), TIFF (very often), WEBP (never, don't use webp), JPEG2000 (aliens), mov/mp4 (never). They can do anything to the colors.
If you want proper, reproducible colors use a player that supports using both an embedded ICC profile and a display-specific profile, like mpv. And I don't think any other viewer/player supports such. But editors like gimp do.
A Mastodon instance for people interested in multimedia, codecs, assembly, SIMD, and the occasional weeb stuff.