function TColorToHex( Color : TColor ) : string;
 begin
   Result :=
     { Rød }
     IntToHex( GetRValue( Color ), 2 ) +
     { Grøn }
     IntToHex( GetGValue( Color ), 2 ) +
     { Blå }
     IntToHex( GetBValue( Color ), 2 );
 end;
 
 
 function HexToTColor( sColor : string ) : TColor;
 begin
   Result :=
     RGB(
       { Rød }
       StrToInt( ''$''+Copy( sColor, 1, 2 ) ),
       { Grøn }
       StrToInt( ''$''+Copy( sColor, 3, 2 ) ),
       { Blå }
       StrToInt( ''$''+Copy( sColor, 5, 2 ) )
     );
 end;
 
 
 
  
                    
                    
                    
                     |