We study the relationship between galaxy luminosity, color, andenvironment in a cosmological simulation of galaxy formation. Using asimple prescription to assign colors and luminosities to simulatedgalaxies, we compare the predicted relationship with that observed forSDSS galaxies and find that the model successfully predicts most of thequalitative features seen in the data, but also shows some interestingdifferences. Specifically, the simulation predicts that the localdensity around bright red galaxies is a strong increasing function ofluminosity, but does not depend much on color at fixed luminosity.Moreover, we show that these trends are due to central galaxies in darkmatter halos whose baryonic masses correlate strongly with halo mass.The simulation also predicts that the local density around blue galaxiesis a strong increasing function of color, but does not depend much onluminosity at fixed color. We show that these trends are due tosatellite galaxies in halos whose stellar ages correlate with halo mass.Finally, the simulation fails to predict the luminosity dependence ofenvironments observed around low-luminosity red galaxies. However, weshow that this is most likely due to the simulation's limitedresolution. A study of a higher resolution, smaller volume simulationsuggests that this dependence is caused by the fact that alllow-luminosity red galaxies are satellites in massive halos, whereasintermediate-luminosity red galaxies are a mixture of satellites inmassive halos, and central galaxies in less massive halos.