What units is transparency stored in ooxml?

2019-09-04 23:23发布

问题:

I have a pptx file with a single shape. Setting it to 70% transaprent I can compare the pptx and see the only difference is in /ppt/slides/slide1.xml

 <a:solidFill>
  <a:schemeClr val="accent1">
   <a:alpha val="40000"/>
  </a:schemeClr>
 </a:solidFill>

Anyone have any idea how on earth "70%" translates to "40000"?

回答1:

It seems different for me. My alpha values seem to use this function:

y = -1000x + 100000

Where x is the percentage and y is the alpha value. I recommend you do the same (figure out a function based on your computer and verify them) and not worry about it.

It seems each single percentage unit corresponds to 1000 of these alpha units.