Therein lies the beauty and magic of this thing called programming! We create virtual universes that can change and bend to our heart's desire, limited only by our imagination. In these little words, we are nothing short of Gods. If you really think about it, it is nothing short of magic. This is the reason why I have always loved computers and programming in particular. This is also why I despise people who cannot see this magic and dismiss programming as nothing more than a clerical job. Too bad for them!
To try and answer your question is a more direct way, a simplistic answer would be to take your example of how the computer know what color
is, for instance. In this case, your color
(say, blue) description in CSS on a webpage is processed by your browser (ultimately) into a series of electrical signals that your OS can understand, and it passes on those signals (or a different bunch of signals) onto your monitor's driver hardware, which then interprets those electronic signals to light up different parts of your screen to varying intensities (and duration) to simulate the colour that your eyes perceived to be blue.
The key thing to remember here is that ultimately everything is about a bunch of electrical signals varying in duration. How those signals are interpreted depends on the hardware itself, whether it be your CPU or your screen hardware. A saner way of understanding it would be to start at this level and work up the user's level.
Now if you ask how the hardware understands those signals, well then you'll have to know a bit about how logic gates work and a bit about how computer logic works. Ultimately, it's all hardware, and logic gates all the way, but the problem is that hardware by itself is restricted in terms of what it can do. Hence the need for software to work with hardware to provide an infinite amount of functionality on top of a basic hardware configuration. Imagine the olden days when telephone operators had to manually switch callers from source to destination as opposed to today where it's all done in software. It's a nice symbiotic relation.
To really "get it" with your mind and your gut, you need to start from the very basic (which, depending on your background can vary in terms of difficulty and/or effort). A course like this - https://www.coursera.org/learn/build-a-computer aims to give precisely that understanding - starting off from designing your own hardware (using emulators, of course), and then working all the way up to writing your own compiler after which the possibilities of what you can do with it are endless.
The basic thing to appreciate is the almost infinite levels of abstraction present from the user to the hardware today, and yet the whole damn thing just works, and not only works, but works almost flawlessly and with unbelievable speed. For me, this is the real wonder and brilliance of our industry as a whole.
EDIT: The linked course is the first part, creating the virtual hardware from scratch. For the software part, here is the link - https://www.coursera.org/learn/nand2tetris2/home/welcome.