Colours on screens and stuff use a combination of red, green, and blue (RGB) light, mirroring the red green and blue receptors in the human eye. When they’re all off, you get black. All on, you get white. Most of the time, you will have 8-bit colour, where the brightness of each colour channel is set to an 8-digit binary number, allowing for 256 brightnesses or intensities for each channel of R, G, and B. You’ve probably seen this when playing around with colours on a computer, where you can set the red green and blue channels to different values between 0 and 255. The number for the red channel controls how red the colour is, and so on for green and blue. The more one of these numbers is larger than the others, the more the final colour is like that channel with the large value (so small value for green and blue, but big value for red will give a very red colour). The more similar the values are, the more pale the colour is. The bigger the numbers, the brighter.
(getting closer to explaining hex colours, bare with me)
There are a few different ways to represent the colours, typically using decimal (base 10, the number system we’re all familiar with, with the digits resetting back to 0 after getting to 9, and the next digit increasing). This is usually done by either having red = [a number], green = [a number], blue = [a number], where the number corresponds to the intensity or brightness of that channel. Sometimes it’s just done using R G and B, sometimes with a colon ( : ) rather than an equals sign ( = ). Sometimes the channel labels are omitted, and you just get a list of the intensities of each channel inside brackets, such as (200, 100, 225) which would be quite a bit of red (200), a bit of green (100) and a bit extra blue (225), resulting in an unsaturated violet.
Hex codes for colour uses a similar principle to the list of numbers outlines above, but omits the commas and the brackets, and uses hexadecimal (base 16) rather than decimal, because each digit in decimal is worth 4-bits and a 2-digit hex number has exactly the same range as the 8-bit numbers used for most colour systems. The first 2 digits represent the red intensity, the second 2 digits represent the green intensity, and the final 2 digits represent the blue intensity (always remember RGB, and you’ll know the order).
Now, I’m sure you’re thinking
“hang on, we only have 10 numbers (0-9), how can we have a number system where each digit can go up to 15 before resetting to zero and incrementing the next digit?”
“What are with those F’s in the codes. Aren’t they supposed to be numbers? ‘F’ isn’t a number”
The secret to hexadecimal is that rather than using just [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], is starts using letters after the number 9, resulting in the digits being [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F], with A being 10, C being 12, F being 16, etc. Just as the number 99 is the largest value which can be represented with decimal, FF is the largest number which can be represented by 2 hex digits, which corresponds to a decimal value of 255; the largest possible 8-bit number and the brightest brightness of a colour channel in standard 8-bit colour.
Red, Green, and Blue can mix to make any colour, all that matters is the proportions.
Good things to keep in mind is that the bigger the values, the brighter or lighter the colour.
The more similar the 3 channel values, the paler the colour (if they’re the same, you get grey, black, or white).
Conversely, the more different they are, the more saturated or vibrant the colour.
Red + Green = Yellow
Green + Blue = Cyan
Blue + Red = Magenta
Red + Green + Blue = White
Ignoring dimming the keyboard (which will universally reduce every channel value by a constant factor, so half brightness means halving the brightness of every channel) the V keyboard basically has each channel being on or off, so the value will either be 0 (00, off) or 255 (FF, fully on). Just add a 00 if the channel is off, and an FF if the channel is on to get the hex code of the keyboard colour.
So if for some reason you chose yellow backlight, that would require the red channel to be on (FF), the green channel to be on (FF), and the blue channel to be off (00). Putting it all together, RGB-wise, gets you the hex code FF-FF-00 or as the computer prefers, FFFF00.