htop, the colours are significant. The value shown on the right (2.58G) corresponds to the green part of the bar, and reflects the memory currently used by programs.
The blue part of the bar represents “buffers”, and the yellow or brown part represents cache (see the
htop FAQ). It’s common for the bar overall to reach 100% or close, because the Linux kernel tries to use as much physical memory as is useful — not just to satisfy running programs’ memory requirements, but also to avoid repeated I/O.
Note too that some programs will by default limit their memory use to around half the installed physical memory; this can happen in particular with JVM-based programs. If you see performance problems related to this you’ll have to tune the relevant program’s configuration.