Its too bad no one has been able to figure out and make a fx tint converter.
More likely because it's so elementary to us computer geeks that we fail to realise anyone might have a problem with it. Here's the C code - after compiling the program and running it, just type in the RGB value to convert.
#include <stdio.h>
int main()
{
int i;
scanf("%X", &i);
i=((i&0x000000FF)<<16)+((i&0x00FF0000)>>16)+(i&0x0000FF00)|0xFF000000;
printf("%d\n", i);
return 0;
}
0 1910 FXTINT -16777037 -16777216
This is a color sample from my pain/energy corruptor. Her primary color was red, backset was black, IIRC. I'm trying to figure out the conversion from whatever this is to RGB, because when I just check the numbers, it doesn't come out right.
The values are stored in the lower three bytes of 32-bit signed integers. The demo commands store them as integers rather than hex strings.
-16777037 = 0xFF0000B3
-16777216 = 0xFF000000
Note that this appears to be in BGR order rather than RGB.
To convert from these values to RGB, you can either use a very simple program in C or use a calculator.
#include <stdio.h>
int main()
{
int i;
scanf("%d", &i);
i=((i&0x000000FF)<<16)|((i&0x00FF0000)>>16)|(i&0x0000FF00);
printf("%06X\n", i);
return 0;
}
There are some roundabout ways of doing it with a calculator app (or an actual calculator). The simplest one is to use Windows' calculator app with its' scientific view:
1. Input the number (with sign) when the calculator is in decimal mode.
2. Switch to hexadecimal mode.
3. Done.
A more roundabout way:
- Add -16777216 to the number.
- For each of the three bytes you want to extract:
- M+ the result.
- Calculate modulo (MOD) 256 of the number you have (in other words, the remainder of division of the number by 256).
The integral part of this number is the decimal value for one byte of the number. (fractions do not matter here) - CE and MR.
- Divide the number by 256.
- Now you have the decimal values of the R G and B channels, extracted in that specific order.
- To convert the decimal value to its' hex equivalent:
- Compute modulo 16 of the number. This is the decimal value of your lower hex digit.
- Divide the number by 16 and ignore fractions. This is the decimal value of your upper hex digit.
- 0-9 in decimal equal same hex digit
- 10 equals A
- 11 equals B
- 12 equals C
- 13 equals D
- 14 equals E
- 15 equals F
- Write down the hex notation determined in the last step. This is the RGB value for your power color.