A possible simple solution. Make 3 tables: 1-Dept_Colors (DeptID, Color), 2-Grade_Colors (GradeID, Color), 3-Emply (EmplyID,Dept,Grade).
Make a query where you join the Employee Dept and grade with the respective table id.
then filter results where the color form the grade matches the color for...