From the quick preview of the game, I assume it would be possible to just do a circle vs circle collision detection. You could accomplish this by seeing if the intersection range is more and less then a certain threshold (this would like you go inside the ball, but a small area would be intersectable).
To accomplish the color collision part, you could test the ball colour with a hard coded colour related to the rotation of the ring (rotation % 360) and say if it is less than 90 but more than 0, only a certain colour can pass. Of course this would only work for one axis (like in the demo), but I assume you could expand it to use the x axis aswell.
Demo (FLAWED doesnt take in account both rings will edit oops!)
public void testCollision()
{
collision = false;
float x1 = ballPosX;
float y1 = ballPosY;
float x2 = ringPosX;
float y2 = ringPosY;
r1 = ballScale;
r2 = ringScale;
float distanceBetween = (x2-x1)^2 + (y1-y2)^2;
float ringThickness = 0.5f;
if(distanceBetween <= (r1+r2)^2)
{
if(y1 + r1 > y2 + yScale - ringThickness && y1 + r1 < y2 + yScale + ringThickness )
{
collision = true;
}
//do same for bottom of ring
}
if(collision)
{
float ringRotation = someValue;
if(ringRotation % 360 < 90 && ballColour == RED)
{
killBall;
}
else
{
//ball is OK
}
else if(ringRotation % 360 < 180 && ballColour == BLUE)
{
killBall;
}
//FOR OPPOSITE SIDE OF RING : do same thing but check if ball y > ring y (or other way around) and then do the opposite value check (eg: 90 degree = 270 degree)
//etc etc...
}
}