wordpress hit counter
Indexed colors - SpreadsheetML - Formats - OpenXML Developer

Indexed colors

Formats

Discussions about working with different Open XML Formats

Indexed colors

  • rated by 0 users
  • This post has 7 Replies |
  • 0 Followers
  • The CT_Color type can have an attribute called "indexed".

    The ECMA specification only says that this is an integer attribute. However it does not say what it means! Unfortunately, Excel uses this attribute.

    Quite frankly, the ECMA specification is not precise enough to allow independent developers to write software. Are there any plans to provide a more complete documentation?

     

  • Hey John,

    Not sure if you saw it, but there are a couple places in the Ecma documentation that states the work is still ongoing and that this is only a draft release. There will most likely be a few more releases before it is done. The WordprocessingML documentation is the most complete at this point, and the SpreadsheetML documentation still has quite a way to go...

    -Brian

  • Hi Brian,

    We agree that the ECMA doc is still work in progress.
    That being said, could someone answer my question about indexed colors?
    No rush, but it would be nice.

    Thanks



  • Hi John,

    I've found that the index refers to a list of colours in the style.xml part.  For example:

    <colors>
       <indexedColors>
          <rgbColor rgb="FF000000" /> 
          <rgbColor rgb="FFFFFFFF" /> 
          <rgbColor rgb="FFFF0000" /> 
          <rgbColor rgb="FF00FF00" />
           .................etc
          <rgbColor rgb="FF333333" /> 
       </indexedColors>
    </colors
    >

    At least this was true in Beta 1 and its technical refresh.  I haven't had much time to work with Beta 2 yet, asided from discovering that they removed the duplicate list of theme colours from styles.xml and started using the theme itself.  In my quick attempts to create a Beta 2 sample I was not able to generate either the indexed list itself or any references to it, but is suspect they are still related.

    Hope this helps.

    Andrea

  • That would be a logical explanation.
    However, the index goes outside the color table. So there is still a mistery.

  • John,

    If the color is given to us as "Indexed" that means one of 2 things: If we are given the "IndexedColors" (usually a non-default palette) in the styles.xml, then the value we are given is the 0-based index into that set of colors. If the "IndexedColors" are not defined, it means the index points into the built-in 64 color palette that was also used in the older versions of Excel.

    Hope this helps

    rudy

  • Rudy,

    Ahhhhh, there is a built-in color palette. Is it documented?


  • I believe it used to be documented in the old Excel binary file format although I am not completely sure. I "inherited" the palette so I am not sure if someone just reverse-engineered it or found it.
Page 1 of 1 (8 items)