Update UIColor.md

This commit is contained in:
Josh Freeman
2018-09-18 12:45:27 +01:00
committed by GitHub
parent 158112afda
commit c6fcce7f8b
+7 -14
View File
@@ -33,40 +33,33 @@ Taking a small snippet:
Focusing on these values, **we need to remove the first byte: F2**
- Before: `<span style="color:#ffff66;">Bio</span>`
- After: `<72>01FA</72><73>01FB</73>Bio<73>01</73><72>01</72>`
- `<72>01FA</72><73>01FB</73>Bio<73>01</73><72>01</72>`
**After that, convert the HEX values to DEC:**
- Before: `<span style="color:#ffff66;">Bio</span>`
- After: `<72>506</72><73>507</73>Bio<73>01</73><72>01</72>`
- `<72>506</72><73>507</73>Bio<73>01</73><72>01</72>`
In Patch 4.4 a new file was added: [UIColor.csv](https://github.com/viion/ffxiv-datamining/blob/master/csv/UIColor.csv)
If our guess of Foreground/Background is correct, then in `UIColor`: Col 1 = Foreground and Col 2 = Background, grabbing the rows related to our decimal values and the correct column we get:
- Before: `<span style="color:#ffff66;">Bio</span>`
- After: `<72>4294928127</72><73>4294174719</73>Bio<73>01</73><72>01</72>`
- `<72>4294928127</72><73>4294174719</73>Bio<73>01</73><72>01</72>`
**And we can convert these values from DEC to HEX:**
- Before: `<span style="color:#ffff66;">Bio</span>`
- After: `<72>FFFF66FF</72><73>FFF3E7FF</73>Bio<73>01</73><72>01</72>`
- `<72>FFFF66FF</72><73>FFF3E7FF</73>Bio<73>01</73><72>01</72>`
The hex can contain the alpha transparency, so if the value is a 8 character hex, **we only care about the first 6.**
- Before: `<span style="color:#ffff66;">Bio</span>`
- After: `<72>FFFF66</72><73>FFF3E7</73>Bio<73>01</73><72>01</72>`
- `<72>FFFF66</72><73>FFF3E7</73>Bio<73>01</73><72>01</72>`
The 01 are always closing colours (resetting back to default text colors) so we can just replace those with generic closing tags and replace the opening tags to be HTML-like:
- Before: `<span style="color:#ffff66;">Bio</span>`
- After: `<72 = FFFF66><73 = FFF3E7>Bio</73></72>`
- `<72 = FFFF66><73 = FFF3E7>Bio</73></72>`
And now it's an easy convert to html:
- Before: `<span style="color:#ffff66;">Bio</span>`
- After: `<span style="color:#FFFF66;"><span style="color:#FFF3E7;">Bio</span></span>`
- `<span style="color:#FFFF66;"><span style="color:#FFF3E7;">Bio</span></span>`
Remove 73 as it doesn't seem to do much right now: