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?

you could try

int some = 182;

string num = some.ToString("X");

“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.