"I want to buy this yellow cap."
Translation:Quiero comprar esta gorra amarilla.
This doesn't necessarily HAVE to be gorra amarilla, it can be gorro amarillo
I'm not sure, but my guess is because there are some words in spanish that can be either gender. I think it's varies on the region. I was very confused because both la refrigeradora and el refrigerador, and el sartén and la sartén were counted as correct, until someone informed me both are used.