This is a blocking job shop scheduling problem.
The description from "An iterated greedy metaheuristic for the blocking job shop scheduling problem" (Pranzo et Pacciarelli, 2016) DOI
In the job shop scheduling problem a set of jobs $J$ must be processed
on a set of machines $M$, each processing at most one job at a time.
The processing of a job on ...
For what it's worth, we've been gathering a bunch of Design Patterns in chapter 20 of OptaPlanner's User Guide. Here are some of the drawings:
There's also a video that explains this deeper.
Besides these modeling basics, there are orthogonal features to consider (document in other places in the user guide):
Pinning: allow the user to lock in a shift ...
Your problem is reminiscent of the makespan minimization version of the Blocking Job Shop (BJS) problem. For a definition of the BJS problem, refer to . If you consider each sequence as a job, and each color as a machine, then, it looks like the problem sizes that you are interested in are pretty large, and so local-search may be your best bet to compute ...