I have installed rainbow-delimiter packages, and I tried to customize it based on the code written in this page. However, I found out that some generated colors are too dark when it is used with a theme with a dark background such as Zenburn.

My question is how to customize it so that the generated color can be more brighter.

1 Answer 1


If you really want random colors from the code, try giving a higher value for the l parameter, which obviously stands for the lightness in the HSL representation. Maybe also reducing the saturation (s) helps. I.e. something like

((... (set-random-rainbow-colors 0.3 0.8))) ;; instead of 0.5 0.49

If you just want to have custom colors for rainbow-delimiters-mode, customize the group "Rainbow delimiters faces", by

M-x customize-group <ret> rainbow-delimiters-faces

(I would actually prefer the colors not to be random, so one immedeately sees "I am on the outer level now" and such.)

  • Thanks @pingi, To add more information here in addition to his answer, since I use the zenburn theme I found that I like this setting most 0.8 0.6 0.7. Thus, in my init file, I write ... '(lambda () (set-random-rainbow-colors 0.8 0.6 0.7)))
    – To Panitan
    Nov 18, 2016 at 22:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.