client/annotviz/app/js/utils.js
author rougeronj
Wed, 21 Jan 2015 20:43:05 +0100
changeset 104 685c5ebc59d0
parent 99 9d968fbcaa2a
child 105 25ac8802c189
permissions -rw-r--r--
update resolution screen

/**
* 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;