79288172

Date: 2024-12-17 14:09:24
Score: 0.5
Natty:
Report link

Firemonkey uses TAlphaColor colours. You can do this:

var C: TAlphaColorRec;
begin
  C.A:=256;  //Unless you also want random transparency!
  C.R:=Random(256);
  C.G:=Random(256);
  C.B:=Random(256);

  Label1.Font.Color:=C;
end;

TAlphaColorRec is in the System.UITypes unit.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Philip J. Rayment