The Pan-Slavic colors (or colours) -- red, blue and white -- were defined by the Prague Slavic Congress, 1848, based on the flag of Russia, which was introduced in the late 17th century. The tricolor flag of Russia was itself inspired by the flag of the Netherlands. Historically, many Slavic nations and states adopted flags and other national symbols that used some combination of those three colors. List of Slavic countries that use or have used the colors include: Russia, Yugoslavia, Czechoslovakia, Czech Republic, Montenegro, Slovakia, Croatia, Serbia and Slovenia. On the other hand, Belarus, Bulgaria, North Macedonia, Poland and Ukraine have never adopted all the colors. (The Flag of Poland is red and white, but has different roots that pre-date the pan-Slavic colors.)
Yugoslavia, both the Kingdom (Kingdom of Yugoslavia, 1918-1943) and the Republic (SFR Yugoslavia, 1943-1992) was a union of several Slavic nations, and therefore not only sported the pan-Slavic colors but adopted the pan-Slavic flag as its own (later adding a red star). The later Federal Republic of Yugoslavia (1992-2003); a federation of Serbia and Montenegro, and its successor state, the State Union of Serbia and Montenegro (2003-2006) also used the pan-Slavic flag until the final dissolution of Yugoslavia in 2006. Serbia continues to use a flag with all three Pan-Slavic colors, along with Russia, Croatia, Slovakia and Slovenia.
The flag of Slovenia was introduced in 1848, when a group of Slovenian intellectuals in Vienna, Austria created the tricolor flag (white-blue-red). Slovakia also has the same tricolor flag design as Slovenia and Russia. The first Slovak flag was also introduced in 1848.
Flag of Kingdom of Montenegro (1910-1918)
Gagauzia (not a Slavic entity)