Regalia draws initial inspiration from the attire of the clergy in medieval Europe, where university education also began. What we now know as the clear types of and distinctions between academic degrees and ranks was not part of the initial use, however. While the protocol around the wearing of academic regalia in the United States has it mainly worn only at graduation ceremonies, it was historically quite common, and sometimes required, to be worn at all times during collegiate studies.
Academic regalia was originally reserved only for masters at a time when bachelor's and master's were the only academic degrees. As recognition spread to bachelor's students and doctorates were established, regalia became a way to clearly distinguish the educational accomplishments of an individual on-site.
There are, generally, three types of academic regalia: bachelor's, master's and doctorates, which includes professional doctorates such as law (J.D.) and medicine (M.D.).
The bachelor's cap (also called a mortarboard) and gown are the most simple. The colors can vary depending on school policies, but black is most common. Master's regalia uses the same cap as bachelor's, but a different gown that has gathering at the front and a sleeve that is elongated at the end so a portion hangs down below the opening for the hand. Master's also adds a hood that has a particular color at the front of the neck indicating the area of study in which the degree is being earned. The Ph.D. gown (most often called a robe at this level) is longer, coming nearly to the floor, has more gathering and often uses horizontal stripes on the upper arm. The hood is larger and longer than the master's hood, though still with the color to identify area of study. The mortarboard is replaced by a tam, often described as a little pillow atop the head.
Distinguishing between the different regalia is fairly simple as the uniqueness of each makes it clear whether you are looking at bachelor's, master's or doctoral regalia. What is more complex is the identification of the area of study for master's and doctoral students based on the color on the hood. As graduationcapandgowns.com lists, these are:
Agriculture-Maize
Arts/Letters/Humanities-White
Business/Accountancy/Commerce-Drab [similar to beige]
Communications/Journalism-Crimson
Dentistry-Lilac
Economics-Copper
Education-Light Blue
Engineering-Orange
Fine Arts (including Architecture)-Brown
Forestry-Russet
Law-Purple
Library Science-Lemon Yellow
Medicine-Hunter Green
Music-Pink
Nursing-Apricot
Oratory (Speech)-Silver-Gray
Pharmacy-Olive Green
Philosophy-Rich Royal Blue
Physical Education-Sage Green
Public Administration (includes Foreign Service)-Peacock Blue
Public Health-Salmon Pink
Science-Bright Gold
Social Work-Citron
Theology (including Divinity, Ministry, Religion)-Scarlet
Veterinary Science-Gray