 this color with the alpha channel
replaced with the given <code>opacity</code> (which ranges from 0.0 to 1.0).</p>
<p>Out of range values will have unexpected effects.</p>
    </section>
    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span></h2>
      <pre class="language-dart"><code class="language-dart">Color withOpacity(double opacity) {
  assert(opacity &gt;= 0.0 &amp;&amp; opacity &lt;= 1.0);
  return withAlpha((255.0 * opacity).round());
}</code></pre>
    <