Color in video games comes from the way the game's graphics are rendered on your screen. Every object is defined by data that tells the system what color and shade each pixel should be, and the graphics hardware draws those colors many times a second to build the image you see.
Early games were limited by their hardware to just a handful of colors, but as technology advanced, developers gained the ability to display millions of shades, which is why modern games look so rich and vibrant compared to their predecessors.