Statictext color

I have a Im not very good at programming and I want to ask if I can somehow check if the color of a statictext is for example red and if it does checkbox will be checked like :
if statictext1.Color:=clred do
chechbox1.Checked := True;

It doesnt work for me like this tho.

This is a forum for competitive robots, not Delphi programming.

Try the Embarcadero developer forums instead:
https://forums.embarcadero.com/index.jspa