From 74832b19a735dbafebf9fc2d5ed4d2529bf66100 Mon Sep 17 00:00:00 2001 From: Isabelle Viktoria Maciohsek Date: Sun, 13 Sep 2020 00:35:04 +0300 Subject: [PATCH] Update RGBToHex.md --- snippets/RGBToHex.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.