Ethiopia and Liberia.
Ethiopia was able to remain independent for the most time, starting from during the European Scrimmage for Africa. Although some critics argue that they were controlled by Italy from 1935–1945+ but relative to other African countries, they were only invaded, not colonized.
Another African country that was never colonized by European imperial powers is Liberia. According to history, Liberia was once ruled massively by Americans, but the very aim of going to the country wasn’t for them to be colonized but to make Liberia a homeland for Africa- American. However, this seems quite complicated, as the Americans wasn’t fully in control of the country’s politics as at that time, although the demographics were heavily Americanized, owning to the fact that most Liberians have lived more in the USA since the slave trade.