Not really despite having been invaded from north africa the spanish caliphate gained its independence after the fall of the Oumayads . then divided into smaller independent Emirates until the Spanish conquest.
I meant it was still considered a colony at the time, when it had non-brazilian rulers but was practically independent from Portugal. I hope you know Brazil hasn't been a colony for around 200 years.