2

For some reason, my alacritty install is not using the colors specified in the config file.

Here is the relevan section of my config.

env:
  TERM: alacritty

colors:
  primary:
    background: '#1c1f26'
    foreground: '#d8dee9'
    dim_foreground: '#a5abb6'
    cursor:
      text: '#2e3440'
      cursor: '#d8dee9'
    vi_mode_cursor:
      text: '#2e3440'
      cursor: '#d8dee9'
    selection:
      text: CellForeground
      background: '#4c566a'
    search:
      matches:
        foreground: CellBackground
        background: '#88c0d0'
      bar:
        background: '#434c5e'
        foreground: '#d8dee9'
    normal:
      black: '#3b4252'
      red: '#bf616a'
      green: '#a3be8c'
      yellow: '#ebcb8b'
      blue: '#81a1c1'
      magenta: '#b48ead'
      cyan: '#88c0d0'
      white: '#e5e9f0'
    bright:
      black: '#4c566a'
      red: '#bf616a'
      green: '#a3be8c'
      yellow: '#ebcb8b'
      blue: '#81a1c1'
      magenta: '#b48ead'
      cyan: '#8fbcbb'
      white: '#eceff4'
    dim:
      black: '#373e4d'
      red: '#94545d'
      green: '#809575'
      yellow: '#b29e75'
      blue: '#68809a'
      magenta: '#8c738c'
      cyan: '#6d96a5'
      white: '#aeb3bb'

The colors section is pretty much taken exactly from nord color scheme, except for the background color which I have made a bit darker.

However, when I test the color used for the 16 base colors (using the escape) sequences like so:

printf "\033[0;32m_hello_\033[0m\n"    #to display "_hello_" in the color green

I get a color that is not present anywhere in any config of mine

I'm trying to determine the actual color displayed by using the colorpickerAUR package like so:

colorpicker --short --one-shot --preview

The displayed colors are completely different from the ones specified in the config. For example:

  • For green instead of #a3be8c, I get #b5bd68
  • For red instead of #bf616a, I get #cc6666

As far as I can tell there is no clear relationship between the expected and actual colors. Maybe there is some color approximation going on, I'm not sure.

What am I doing wrong here? If this is an approximation issue, how do I make alacritty use truecolor?


Edit: Chaging TERM to xterm-256color doesn't fix the problem

Parth K
  • 587
  • 5
  • 18

1 Answers1

0

I think the problem is your indentation: You have normal/bright/dim indented past primary, but those need to be at the same indentation level as primary.

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
Jeff B
  • 1
  • 3
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 09 '22 at 15:17