Legible jq colours

I have a fancy Terminal emulator that switches between a light and dark theme as the sun moves overhead. This feels easier on the eyes, but poses a challenge with colourised output from the plethora of tools and hacky scripts I tinker with daily.

I noticed the issue when fetching my GitHub user info with jq. It turns out the Home Manager module I’m using to manage my jq installation has direct support for the JQ_COLORS environment variable, which causes problems while the sun is in sight.

The fix was relatively easy. I swapped out the use of white with something more neutral.

programs.jq = {
  enable = true;

  colors = {
    null = "1;0";
    false = "0;0";
    true = "0;0";
    numbers = "0;34";
    strings = "0;32";
    arrays = "1;0";
    objects = "1;0";
  };
};

I could test both the light and dark versions but have a doughnuts waiting for me downstairs, so future me can deal with it while I devour three Crispy Cremes.