Hola.
Lo que quieres hacer se puede hacer bastante sencillo con un sql, pues aunque las consultas son todas sobre la misma tabla, tú puedes cruzar una tabla consigo misma de la siguiente manera:
Código PHP:
select a.COLOR
from MIS_COLORES_FAVORITOS a, MIS_COLORES_FAVORITOS B
where a.MIS_GUSTOS = 'Pepe' and b.MIS_GUSTOS="Rosa"
and a.COLOR=b.COLOR
Esta select te devuelve los colores que tienen en común Rosa y Pepe.
Si quieres puede hacerlo definiendo el inner join:
Código PHP:
select a.COLOR
from MIS_COLORES_FAVORITOS a, inner join MIS_COLORES_FAVORITOS B on a.COLOR=b.COLOR
where a.MIS_GUSTOS = 'Pepe' and b.MIS_GUSTOS="Rosa"
Un saludo.