- Home /
In c# how does one convert RGB to ARGB hex?
I'm using a Prime31 plugin that says this in the docs:
"Colors should be hex with alpha. Ex of orange full opacity: 0xFF0000FF"
Is there a built-in c# function that will let me easily convert known values like rgba(255,255,255,1) into "0xFF0000FF" so I can use this plugin?
Answer by AlanParsons · Aug 25, 2012 at 06:36 PM
"Colors should be hex with alpha. Ex of orange full opacity: 0xFF0000FF" -- full opacity orange is indeed not 0xFF0000FF. That's blue. 0x just means hexadecimal. Makes a lot more sense now.
Answer by fafase · Aug 24, 2012 at 10:32 PM
you could try
int some = 182;
string num = some.ToString("X");
Your answer
Follow this Question
Related Questions
Looping on materials.. 2 Answers
Random Color 1 Answer
Changing material color between scenes 1 Answer
Custom shader converting to urp need help 1 Answer
Failed first attempt when inviting friends using the Prime31 iOS Facebook Plugin 1 Answer