Android Studio Java .setTextColor Logic Error

Hello I’m Having a problem with my simple Android Application, it can’t change the Text Colors in the other Activity which is displayActivity.java Here’s my Code sample.

The problem is if the texts are both equal it will change into color greensuccess
but it did change into rederror

MainActivity.java

public class MainActivity extends AppCompatActivity {
public static final String xy = "ict402.germio.intent";
public static final String xz = "ict402.germio.intent";
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);


}

    public void send(View view){

        EditText a = findViewById(R.id.a);
        EditText b = findViewById(R.id.b);

        String strx =(a.getText().toString());
        String stry =(b.getText().toString());


        if (strx.compareToIgnoreCase(stry) == 0)
        {
            // this line WILL print

            Intent i = new Intent(this, displayActivity.class);

            String t = ("Case Ignored n VALUES ARE THE SAME CONGRATS!").toString();
            i.putExtra(xy,t);
            startActivity(i);


        } else {
            Intent i = new Intent(this, displayActivity.class);

            String y = ("Case Ignored n VALUES ARE NOT THE SAME SORRY!").toString();
            i.putExtra(xz,y);
            startActivity(i);

        }


    }
}

displayActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_display);



    Intent i = getIntent();
    String message = i.getStringExtra(MainActivity.xy);
    TextView t = findViewById(R.id.x);
    t.setTextColor(getResources().getColor(R.color.success));
    t.setText(message);



    Intent o = getIntent();
    String msg = o.getStringExtra(MainActivity.xz);

    TextView q = findViewById(R.id.x);
    q.setTextColor(getResources().getColor(R.color.error));
    q.setText(msg);





    }
}