title: Getting Hex from RGBA in js
body: <p>How to convert given RGBA to hex assuming value of each of them are given as separate variables r, g, b, a where r, g &amp; b are 1-225 and a in 0-1 in javascript.</p>
  <p>Please define a function for it.</p>