Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionprocedure ColorToHTML(const C: integer): string; var BTC : array[$0..$F] of char = '0123456789abcdef'; begin result := '#000000'; result[1] := BTC[byte(C) shr 4]; result[2] := BTC[byte(C) and $F]; result[3] := BTC[byte(C shr 12) and $F]; result[4] := BTC[byte(C shr 8) and $F]; result[5] := BTC[byte(C shr 20) and $F]; result[6] := BTC[byte(C shr 16) and $F]; end;