A note on how colours work/are specified in browsers:
The colour code is made up of three groups, red green and blue and formatted as RRGGBB in hex.
If legibility for visually impaired or colour blind people is important to you (and if not why not?)
Then assuming a white or near white background a good technique to adopt is this:
Ensure that none of RR, GG, or BB have the a value near the value of white.
Make strenuous efforts to avoid values of FF in any of the RR, GG or BB positions.
Try to avoid anything beginning with F (F0, F1...F9, FA, FB .... FF).
If you can avoid anything that starts with a letter at all. The lower the first number in each of the three positions, the better (when on a white background).
All of the above improves contrast/legibility for everyone moreover it helps colour blind people to be read your text easily (I have covered several different types of types of colour blindness here. )
Here are a few you might like to have a look at:
#191970 - midnight blue #2F4F4F - a dark grey #353535 - almost black #3B3B3B - also almost black
The above are also quite restful on the eye for normally sighted persons btw
A personal favourite of mine is this:
#5C5C5C
_____________________________
Mháircaish
Signature self-censored to protect the sensibilities of the thin-skinned .
May we never confuse honest dissent with disloyal subversion. – Dwight D. Eisenhower