Cant convert HEX

I'm trying to convert this color " #E5AA70" not sure why when it run through r it get this error
12 Replies
MODiX
MODiX2y ago
Angius#1586
REPL Result: Success
int.Parse("FA75C7", System.Globalization.NumberStyles.HexNumber)
int.Parse("FA75C7", System.Globalization.NumberStyles.HexNumber)
Result: int
16414151
16414151
Compile: 473.281ms | Execution: 21.937ms | React with ❌ to remove this embed.
Angius
Angius2y ago
This is sus in your example
Angius
Angius2y ago
Looks like leading whitespace
TotechsStrypper
okay let me see
Angius
Angius2y ago
.Trim() it just to make sure
TotechsStrypper
I think there is
TotechsStrypper
like this ?
Angius
Angius2y ago
hex = hex.Replace(...).Trim();
TotechsStrypper
it work thanks weird avatar anime guy (send me the girl name would be awesome)
Angius
Angius2y ago
Tanya Degurechaff from Youjo Senki
Groophy
Groophy2y ago
@TotechsStrypper Better way you can use
hex = hex.TrimStart('#');
hex = hex.TrimStart('#');
Angius
Angius2y ago
Yeah, that'd probably be better Assuming there's no whitespace anywhere else