Videos
ELI5: How HEX code works and how you can tell what color it is by looking at the numbers/letters
using or converting hex color codes in bash scripts?
hex codes (#rrggbb) are used by your terminal emulator, while escape codes (\033[x;3xm) are used by your shell. Terminal emulators and shells are two dinstinct programs.
when you input printf "\033[1;31mRED\033[0m\n" printf in your shell (eg, bash), the shell reads "Hey I want to print "RED" using the foreground color 1 in bold. That's all it does. The terminal emulator then interprets it as "Okay, so the shell wants color 1 in bold. By my config file, I see that the corresponding hex code is #a42331, so there you go shell".
Your terminal can display 256 different colors, but your shell can only use 16 at the same time. (Though there are ways to output those 256 colors to stdout. Vim can use them all for example).
More on reddit.comRandom HEX color
Official reddit brand hex color codes
What is a HEX color code?
What color formats are supported?
Is Image Color Picker free to use?
I am in Intro to Programming and our professor assumed everyone already knew this. I am also a graphic design major and don't know how I don't know this already, but I have googled a little bit and it all goes over my head.
EDIT*: Ahhhh! Now I see! Thanks guys! First thing I've posted to ELI5 and a great response!