Graphic Delphi

Title: How to calculate a string dependent color
{ .... }
function MakeColorFromStr(str: string): TColor;
{ .... }
function MakeColorFromStr(str: string): TColor;
var
i, x, y: Cardinal;
const
Helligkeit = 0; //Minimale Helligkeit der Farben (0..255) ?C
begin
y := 1; //initialisieren
for i := 1 to Length(str) do
begin
x := Ord(Str[i]);
RandSeed := X * i;
y := y + Random(99);
end;
RandSeed := y;
Result := rgb(Random(255 ?C Helligkeit) + Helligkeit,
Random(255 ?C Helligkeit) + Helligkeit,
Random(255 ?C Helligkeit) + Helligkeit);
end;