title: How to create lighter color in matlab?
body: <p>I have a base color, presented by basic [R G B] matrix.</p>
  
  <p>And I want to create a lighter or darker version of that color, based on my constant, which is basically an angle (0 - 90°).</p>
  
  <p>And I looking for an algorithm, how to create lighter or darker color based on that angle.</p>
  
  <p>The endpoint for a lighter color is white and for a darker color is black.</p>
  
  <p>silly example:</p>
  
  <pre><code>Green -&gt; Lime -&gt; White
  
  Blue -&gt; Navy -&gt; Black
  </code></pre>
  
  <hr>
  
  <pre><code>function [result] = GetColor(baseColor, angleValue)
  
      value = round(angleValue);
  
      endcolor = [1 1 1];
  
      r = linspace(basecolor(1,1), endcolor(1,1), 90);
      g = linspace(basecolor(1,2), endcolor(1,2), 90);
      b = linspace(basecolor(1,3), endcolor(1,3), 90);
  
      result = [r(value) g(value) b(value)];
  
  end
  </code></pre>