How to code color sorting, Pros

How do I code color sorting on pros? I looked at past threads and none of them make sense. Im new to pros.

I looked at this thread but when I tried to make a variable, I couldn’t figure it out.
How to code a Optical Sensor - #3 by RuthvikSM - Programming Support - VEX Forum