title: How to use angular material theme color in TypeScript / JavaScript?
body: <p>I don't know how to get the primary theme color (Angular Material) in a e.g. <code>component.ts</code>. </p>
  
  <p>I can use <code>color="primary</code> in my <code>template.html</code> or <code>mat-color($primary)</code> in a <code>style.scss</code>. But how do I use theme colors for styling an element inside a canvas? <strong>How do I use them inside my TypeScript-code</strong>? </p>
  
  <p>Info:</p>
  
  <pre><code>"@angular/material": "^5.0.0-rc.2",
  "@angular/core": "^5.0.0"
  </code></pre>