I have a menu in which the user can select colors, I display them as follows:

Since I write color codes in black, the dark blue background makes it difficult to read, and the black is obviously completely hidden. Firstly, this is not particularly important, color is what interests the user.
I could put the color code in a separate frame on a white background, but out of interest I wondered if there was some standard code to handle this or some simple method that could be applied to ensure that the text is always read ? If anyone could point me to a resource with any help, that would be appreciated.
source
share