Update CEGUI's colour format to RGBA

Issue #1030 new
Luca Ebach created an issue

CEGUI's colour format is still ARGB. It should be migrated to RGBA because that is the de-facto standard everywhere.

Reproducibility: always

OS: any OS, OS build: , Platform: any platform

Comments (7)

  1. Lukas Meindl

    Are you referring only to internal (not exposed) formats or to how Colour and ColourRect are interpreted (as XML and String-version)? They are in hexadecimal ARGB format currently and I agree that RGBA would be better, however this might anger a lot of users (they would have to migrate all the XML and code stuff ).

    I guess if we fully change to RGBA we should provide things like Visual Studio and Notepad++ regex's that allow to change the formats with replace-all. People who load old LNFs or layouts without converting them would definitely be confronted with a bad surprise ;)

  2. Martin Preisler

    Is this really worth it, considering it breaks all datafiles for everybody?

    Instead of providing regexes we could just write compat layers for CEED that do the magic automatically. But it would still be a pain for users.

  3. Lukas Meindl

    i think once people work with CEED they dont even really care. I mean, if you use a tool you can now use the colour picker for changing colours. Afaik I added that didnt I?

  4. Lukas Meindl

    Btw., @Martin Preisler can't we use the layout and looknfeel XML file's versions to determine how to parse this. We could parse the old files correctly and parse the new datafiles with the new format. This way both versions would work and implementing this is really easy, i would volunteer for the fix in default branch

    The only issue would be that this change would still break people's code. Imo that is still worth it in default, for having a cleaned up future ;)

  5. Lukas Meindl
    <Ident> oh regarding the suggestion by lucebac to change ARGB to RGBA
    <Ident> what if we made the old layouts load correctly
    <Ident> interpreting the colours as ARGB
    <Ident> but higher versions could just load it RGBA
    <mpreisler> yes, that's the way to do it
    <mpreisler> CEED compat layers can just easily convert it
    <Ident> its a minimal effort
    <mpreisler> still people will be hit by this
    <Ident> the xml loader would nee to be modified minimally
    <Ident> yes
    <mpreisler> but it's easy enough to notice and fix
    <Ident> true
    <Ident> we would have to placate this change big and large
    <Ident> if thats done then people will be aware
    <Ident> and i m sure many people will find rgba more convenient
    <Ident> for me this was always annoying in cegui
    <Ident> so for 1.0 that would make for a good change imo
    <mpreisler> we could also change the syntax in a way the parser can detect
    <mpreisler> like rgb(1,2,3)
    <mpreisler> rgba(1,2,3,4)
    
  6. Log in to comment