Rich Text uses #AARRGGBB or #RRGGBBAA ?

Anything related to the content on our wiki (https://wiki.factorio.com/)

Moderator: Bilka

Post Reply
User avatar
moon69
Fast Inserter
Fast Inserter
Posts: 181
Joined: Sun Sep 18, 2016 6:53 pm
Contact:

Rich Text uses #AARRGGBB or #RRGGBBAA ?

Post by moon69 »

wiki.factorio.com/Rich_text shows #AARRGGBB, but it looks to me in-game like #RRBBGGAA ?

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Rich Text uses #AARRGGBB or #RRGGBBAA ?

Post by posila »

It is #AARRGGBB, but it is expected to be with premultiplied alpha, as every other color value in the game. Honestly, now I regret even allowing it to have alpha in this format.

User avatar
moon69
Fast Inserter
Fast Inserter
Posts: 181
Joined: Sun Sep 18, 2016 6:53 pm
Contact:

Re: Rich Text uses #AARRGGBB or #RRGGBBAA ?

Post by moon69 »

Thanks Posila. Apologies for that.

For my future reference... you can't currently use lualib util.color(hex) function for this!

Code: Select all

function util.color(hex)  -- supports 'rrggbb', 'rgb', 'rrggbbaa', 'rgba', 'ww', 'w'

Post Reply

Return to “Wiki Talk”