title: Set Shape.Fill.BackColor.RGB in C# Office.Interop.Word
body: <p>I have searched and found many articles with snippets on this topic but I still can't set the correct color.  Any help in identifying what I am missing would be appreciated.  I am using C# .NET 4.7.2, Office.Interop.Word v15.0.0.0, and MS Word 365 v2202</p>
  <p>I want to set the fill color and line color of a rectangle to an RGB value of (34, 60, 87).  The fill should have transparency of 70% and the line width of 1pt.  Here is my code:</p>
  <pre><code>var backColor = ColorTranslator.ToOle(Color.FromArgb(34, 60, 87));
      
  shape.Fill.BackColor.RGB = backColor;
  shape.Fill.Transparency = (float).70;
  
  shape.Line.BackColor.RGB = backColor;
  shape.Line.Style = Microsoft.Office.Core.MsoLineStyle.msoLineSingle;
  shape.Line.Weight = (float)1;
  </code></pre>
  <p>When I open Word and check the fill color -- MS Word shows RGB value of (68, 114, 196) and transparency at 70%</p>
  <p>When I check the line color -- MS Word shows RGB value of (47, 82, 143) and a line width of 1pt</p>