The sunlight which illuminates the Earth is actually white. White light is nothing else but the combination of all colours (the entire spectrum of wavelenghts). When the object is exposed to white light, it absorbs almost all colours, but it still deflects some of them. That deflected part of the spectrum is the colour we see. This can only apply to objects that are intransparent, that don`t pass the light.