[Autoit][UDF] Hex-RGB
28 giugno 2010
Autore: I.Ren
Commenti:questa UDF converte i colori da Hex a RGB e viceversa
Download: Hex-RGB.au3 (“Tasto destro –> Salva destinazione con nome…”)
Esempio:
$col = InputBox(‘Inserisci’,’Inserisci il colore in HEX!’)
If StringTrimRight($col,stringlen($col)-2) = ‘0x’ And StringLen($col) = 8 Then
$1 = Hex2RGB($col,1)
$2 = Hex2RGB($col,2)
$3 = Hex2RGB($col,3)
$RGB = RGB2Hex($1,$2,$3)
$HEX = Hex2RGB($col)
MsgBox(0x40,’Risultato’,’Colore in RGB del hex immesso: ‘&$HEX&@cr&’Convertito: ‘&$RGB)
Else
MsgBox(0x10,’Errore’,’DEVI mettere un HEX valida!’)
EndIf