diff --git a/snippets/RGBToHex.md b/snippets/RGBToHex.md index 8ffb2f652..ca4bc9cc8 100644 --- a/snippets/RGBToHex.md +++ b/snippets/RGBToHex.md @@ -3,7 +3,7 @@ title: RGBToHex tags: string,math,intermediate --- -Converts the values of RGB components to a color code. +Converts the values of RGB components to a hexadecimal color code. Convert given RGB parameters to hexadecimal string using bitwise left-shift operator (`<<`) and `toString(16)`, then `String.padStart(6,'0')` to get a 6-digit hexadecimal value.