Convert RGB to Hexadecimal
Available since: @sardine/colour@1.6.0
Description
This function converts RGB colours into hexadecimal.
It accepts an RGB object and converts it into a hexadecimal string.
Signature
function convertRGBtoHex(colour: RGBColour): string;
Example
import { convertRGBtoHex } from "@sardine/colour";
const hexColour = convertRGBtoHex({ R: 34, G: 250, B: 124 });
console.log(hexColour);
/* expects #22FA7C */