title: WebGL color conventions - which do I use and why?
body: <p>So I'm learning WebGL for the first time, and I'm having difficulty understanding WebGL colors.</p>
  
  <p>My concern is that I have seen 2 formats or conventions for writing RGBA color data (or vectors if that is what they are called? - regarding shaders)</p>
  
  <p>Mozilla uses color on a scale of 0 to 255:</p>
  
  <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Pixel_manipulation_with_canvas" rel="nofollow noreferrer">Here is an example</a></p>
  
  <p>However, I have seen other cases where developers (like this <a href="https://youtu.be/3yLL9ADo-ko" rel="nofollow noreferrer">YouTuber</a>) use color on a scale of 0 to 1.0,</p>
  
  <p>Is this a preference? Is it mandatory what convention you use per situation? If it is preference and not mandate, can I mix and match the two? Do browsers have a preference?</p>
  
  <p>For example in regards to mixing, is <code>[1.0, 255, 1.0, 255]</code> fully opaque white?</p>