API Reference

Returns the hexadecimal code of an RGB value

function rgbToHex(red: number, green: number, blue: number): string

// Example:

rgbToHex(255, 0, 0) //=> #FF0000
 
rgbToHex(189, 23, 123) //=> #BD177B