The color and position of vector objects are stored within the definition of the object. Vectors are not resolution dependent and can be scaled without loss of quality. There are a large number of graphic file formats in common use. Fortunately, you only need to use a few of these in day to day practice. Knowing which formats to use for which purpose is the important issue.
Some formats are proprietary and useful only in the program used to modify or acquire the image.
Others are useful for exchange between programs and computer platforms or for presentation in web pages. Scientific images should be acquired and archived using a lossless file format. Some file formats that use compression actually delete pixel information when the file is saved, while others don't. Graphic file formats described as 'lossy' use mathematical algorithms to discard some data in order to compress the file and make it smaller. The data is then filled in by best guess methods when the file is reopened.