title: How to color numbers in a vector by magnitude?
body: <p>TL;DR: Trying to color console outputs in gradient values. I want to color elements in a vector according to their magnitudes and negativeness/positiveness.</p>
  
  <p>I want to test output that will display ColumnA, ColumnB next to each other as a "table" (something I need to do using nothing more sophisticated than iomanip), but I want entries in columnB to be colored by their relative magnitudes (most negative-->bright red, most positive --> bright blue). If it is illegible against the black background, I would be happy with highlights. I suspect (but hope not) that I might have to install another libray?</p>
  
  <p>I am just starting, so I want to test coloring vector elements with a simple example first.</p>
  
  <p>Minimum working example:</p>
  
  <pre><code>#include "pch.h"
  #include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;string&gt;
  #include &lt;iomanip&gt;
  using namespace std;
  
  //test these arrays first:
  vector&lt;int&gt; columnA{ 0,1,2,3,4,5,6,7,8,9,10 };
  vector&lt;int&gt; columnB{ -5,-4,-3,-2,-1,0,1,2,3,4,5 };
  
  int main()
  {
      for (int i = 0; i &lt; 11; i++) {
          cout &lt;&lt; columnA[i] &lt;&lt; "   " &lt;&lt; columnB[i] &lt;&lt; endl;
      }
  }
  </code></pre>