Skip to content

function rgbToHex (shared-side)

Available since version: 0.0.1

This function will convert rgb color to hex representation.

Declaration

string rgbToHex(int r, int g, int b)

Parameters

  • int r: the red color component in RGB model.
  • int g: the green color component in RGB model.
  • int b: the blue color component in RGB model.

Returns string

The lower case hexadecimal representation of rgb color.