What determines the colors of events/homework on the calendar?

Calendar event colors for Students/Guardians are determined by the following criteria

Calendar events can be posted by the school admins or by teachers.  They both have the option of creating All Day Events (blue) or time-constrained events (no background color).  Teachers also have the option of showing homework assignments on the calendar.  Their colors are determined by status.  See the below chart: