https://bz.apache.org/bugzilla/show_bug.cgi?id=64241

--- Comment #3 from Andreas Beeker <[email protected]> ---
Created attachment 37114
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37114&action=edit
Examping showing the wrong background color / calculation

Simplified version which renders too bright - I guess the tint calculation is
wrong.

So POI does currently the following:

- get background definition from the master slide: ...
  <p:bg><p:bgRef idx="1001"><a:schemeClr val="bg2"/></p:bgRef></p:bg>

- map the color on the master slide:
  <p:clrMap ... bg2="lt2" />

- get the background definition from the theme:
   <a:solidFill>
      <a:schemeClr val="phClr">
         <a:tint val="88000"/>
         <a:satMod val="105000"/>
      </a:schemeClr>
   </a:solidFill>

- get the color from the theme:
  <a:lt2><a:srgbClr val="FBEEC9"/></a:lt2>

- convert the color to HSL (H in [0..360], S in [0..100], L in [0..100]):
  H = 44.39999999999998
  S = 86.20689655172413
  L = 88.6274516582489

- apply the satMod:
  S *= 1.05
  S = 90.51724137931033

- apply the tint:
  // Lum‘ = Lum * (1-tint) + (HLSMAX – HLSMAX * (1-tint)) with HLSMAX = 100
  L = L * (1-0.88) + (100 - 100*(1-0.88))
  L = 98.63529419898987

- and converting it back to RGB

... changing the tint to L=L * 0.88 + 100 - 100*0.88 looks promising

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to