How to program a robot to rotate towards a color-classified object

I was given a task to write a commend in java that rotates a robot towards a color-classified object using Limelight 3 vision camera. I have searched for code examples but I have not found some yet. I would really like for a written code example or any other kind of help.

The LimeLight Case Studies have basic implementations of this. Case Study: Aiming Using Vision — Limelight 1.0 documentation

Use this and Building a Retroreflective/Color Pipeline — Limelight 1.0 documentation to get the rotation. There are many way to go at this from here.