100-days-of-rust/Week-08/Day-54_RGB-To-Hex-Color-Converter
2024-09-17 08:21:21 +02:00
..
day54 Wrote program for Day 54 2024-09-17 08:21:21 +02:00
README.md Add files via upload 2023-03-23 21:14:34 -04:00

RGB to Hex Color Converter

Create a function that converts color in RGB format to Hex format.

Examples

rgbToHex("rgb(0, 128, 192)") ➞ "#0080c0"

rgbToHex("rgb(45, 255, 192)") ➞ "#2dffc0"

rgbToHex("rgb(0, 0, 0)") ➞ "#000000"

Notes

  • The Hex format should be displayed in lowercase.