What does alpha val="0" mean?

David Thielen 2,256 Reputation points
2020-12-27T17:15:46.877+00:00

Hi all;

In the DOCX spec it says that alpha val="50%" means 50% alpha. So I have two questions:

First is 0 fully transparent, or no transparency?

Second, Word is not writing the %. Inside a shape (that holds a textbox) it has:

<a:solidFill>
  <a:schemeClr val="bg1">
    <a:alpha val="0"/>
  </a:schemeClr>
</a:solidFill>

Is "0" assuming "0%"? And when we write out a docx should we also drop the %?

thanks - dave

Office Open Specifications
Office Open Specifications
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Open Specifications: Technical documents for protocols, computer languages, standards support, and data portability. The goal with Open Specifications is to help developers open new opportunities to interoperate with Windows, SQL, Office, and SharePoint.
119 questions
{count} votes

Accepted answer
  1. Tom Jebo 151 Reputation points
    2020-12-29T20:03:37.673+00:00

    Hi Dave,

    MS-OI29500 does discuss this:

    2.1.1217 Part 1 Section 20.1.2.3.1, alpha (Alpha)
    a. The standard states that the val attribute specifies the opacity as expressed by a percentage
    value.
    Office uses the val attribute to specify a percentage value for several elements.
    b. The standard states that ST_PositiveFixedPercentage is read and written as a floating point value
    with a trailing percent sign.
    Office will read in percentages formatted as floating point value with a trailing percent sign or as
    an integer 1000th of a percent without trailing percent sign, but only write out percentages as the
    latter.

    And higher percentage or value indicates more transparency.

    Does that help?

    Best regards,
    Tom Jebo
    Sr Escalation Engineer
    Microsoft Open Specifications

    0 comments No comments

0 additional answers

Sort by: Most helpful