Conversion Iteration #2: Color

March 14, 2022
screenshot of converter

For iteration #2: I added Hex color to RGB to the conversion app page converter.

Hex:

This will take the 6-digit hex color only accepting 0-9 and A-F. Then it will convert the Hex to RGB with commas between the 3 color grouping.

RGB:

For the RGB to Hex the user will need to include the commas between the color groupings. This will convert it over to the Hex coding, making the A-F in caps. While it doesn’t matter in the hex code if it’s upper or lowercase I’ve always preferred to have it in uppercase making it a bit quicker to spot in the code. The RGB separated by commas since this is how it’s expected in most programs.

Looking up the formulas for the conversion took some time, found a few different ones but after some trials got one that matched the sample version.

For testing I used: https://en.wikipedia.org/wiki/Web_colors
In my testing I used about 20 colors or more to test the conversions between the two. About 10 for hex to see if the RGB is correct then reversed it for other colors. I used different color types like close to white, reds, blues, a green, and a dark gray.

Related Articles

Sometimes the low-tech approach is the best way

Sometimes the low-tech approach is the best way

Have a family member looking to get me some family videos they had digitized, in one big file, about 80GB (they may not have optimized or know how). The need: The family member’s internet connection isn’t the best and could get disconnected at times, when this happens...

read more
AWS HTML Forms email and database working notes

AWS HTML Forms email and database working notes

Over the last weekend I worked to get a basic working version of 2 features for a HTML website forms to process through AWS. Those are proof of concepts (POC) to make sure that I can make them and write down the basic instructions for myself and notes of what to look...

read more
Received AWS Certified Cloud Practitioner Certificate

Received AWS Certified Cloud Practitioner Certificate

This past weekend I tested and received my AWS Certified Cloud Practitioner certification. When I started training for the test I had very little exposure to AWS. I studied for a little over a month, around 60 hours, before taking the test; which luckily I passed on...

read more

Pin It on Pinterest

Share This