client/annotviz/app/js/utils.js
author rougeronj
Tue, 20 Jan 2015 12:00:40 +0100
changeset 99 9d968fbcaa2a
child 105 25ac8802c189
permissions -rw-r--r--
Add General Time Line + minor change in annotsRoll

/**
* js/utils.js
*
* basic tools
*
*/

'use strict';

function rgb2hex (r, g, b) {
	return "0x"
		 + ("0" + parseInt(r, 10).toString(16)).slice(-2)
		 + ("0" + parseInt(g, 10).toString(16)).slice(-2)
		 + ("0" + parseInt(b, 10).toString(16)).slice(-2);
};

module.exports = rgb2hex;