You are not logged in.

#1 2024-10-16 19:19:56

b42
Member
Registered: 2023-07-20
Posts: 189

Why nvim processes colors differently?

I just got a fresh installation and nvim processes colors differently even though I source colors from the same config file.

I just put the old disk and did system update and the colors are how they should be on my old installation.

How do I get the right colors which supposed to be sourced from my file?

Offline

#2 2024-10-16 20:39:15

seth
Member
Registered: 2012-09-03
Posts: 58,994

Re: Why nvim processes colors differently?

I'll tell you when you find a blind person and explain to them what blue looks like.

Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855
Then elaborate on situation and context, how are the colors "wrong" (link comparing screenshots) in what terminal emulator etc et pp.

Online

#3 2024-10-16 21:27:25

b42
Member
Registered: 2023-07-20
Posts: 189

Re: Why nvim processes colors differently?

Sorry.

New installation:
https://i.ibb.co/vsswv1N/pic-selected-2 … 024-48.png

Old one (what I was expecting for):

https://i.ibb.co/2YKk74X/pic-selected-2 … 031-43.png


Terminal Emulator - st

Last edited by b42 (2024-10-20 08:05:13)

Offline

#4 2024-10-16 21:42:36

seth
Member
Registered: 2012-09-03
Posts: 58,994

Re: Why nvim processes colors differently?

"link",  not "embed"

Those are primarily dfiferent colorschemes (compiled) in st.

    for x in 0 1 4 5 7 8; do
        for i in {30..37}; do
            for a in {40..47}; do
                printf "\e[$x;$i;$a""m\\\e[$x;$i;$a""m\e[0m "
            done
            echo
        done
    done
    echo

Those tables will likely look different?

Online

#5 2024-10-16 21:48:17

b42
Member
Registered: 2023-07-20
Posts: 189

Re: Why nvim processes colors differently?

what do you mean by that?

I build st from exactly the same source. Which means everything should be the same regarding st?

Offline

#6 2024-10-16 21:54:07

seth
Member
Registered: 2012-09-03
Posts: 58,994

Re: Why nvim processes colors differently?

That script will print the main 16 terminal colors and st is by default configured at compile time and "same source" is meaningless, the config.h is locally generated.
If this prints different colors in the two terminals, it's the st color configuration.

Online

#7 2024-10-16 22:06:30

b42
Member
Registered: 2023-07-20
Posts: 189

Re: Why nvim processes colors differently?

New installation:
https://i.ibb.co/0mwfJcB/pic-selected-2 … 108-36.png


Old installation (how it is supposed to be):
https://i.ibb.co/nMn3KH9/pic-selected-2 … 105-20.png

Seems like they are the same.

Last edited by b42 (2024-10-20 08:05:49)

Offline

#8 2024-10-16 22:08:47

seth
Member
Registered: 2012-09-03
Posts: 58,994

Re: Why nvim processes colors differently?

Again: please don't embed huge pictures.
The board has a 250x250 px rule.
Edit and fix your posts.

Online

#9 2024-10-16 22:12:58

b42
Member
Registered: 2023-07-20
Posts: 189

Re: Why nvim processes colors differently?

how to I embed them corretly..?

Offline

#10 2024-10-16 22:18:24

seth
Member
Registered: 2012-09-03
Posts: 58,994

Re: Why nvim processes colors differently?

Not. Just post a url pointing to them.

It would seem you're using different vim colorschemes then, the new one also being a 256 color one.
https://neovim.io/doc/user/usr_06.html#06.3
What does ":colorscheme" report in either case?

Online

#11 2024-10-17 08:20:08

b42
Member
Registered: 2023-07-20
Posts: 189

Re: Why nvim processes colors differently?

:colorscheme report 'vim' for both cases.

The thing is, the colors are sourced from the same file:

vim.cmd.highlight('clear')
vim.g.colors_name = 'vim'

local hi = function(name, val)
  -- Force links
  val.force = true

  -- Make sure that `cterm` attribute is not populated from `gui`
  val.cterm = val.cterm or {}

  -- Define global highlight
  vim.api.nvim_set_hl(0, name, val)
end

--stylua: ignore start
-- General
hi('Normal', {})

hi('Conceal',      { fg = 'LightGrey', bg = 'DarkGrey', ctermfg = 'LightGrey', ctermbg = 'DarkGrey' })
hi('Cursor',       {})
hi('lCursor',      {})
hi('DiffText',     { bg = 'Red', bold = true,           ctermbg = 'Red', cterm = { bold = true } })
hi('ErrorMsg',     { fg = 'White', bg = 'Red',          ctermfg = 'White', ctermbg = 'DarkRed' })
hi('IncSearch',    { reverse = true,                    cterm = { reverse = true } })
hi('ModeMsg',      { bold = true,                       cterm = { bold = true } })
hi('NonText',      { fg = 'Blue', bold = true,          ctermfg = 'Blue' })
hi('PmenuSbar',    { bg = 'Grey',                       ctermbg = 'Grey' })
hi('StatusLine',   { reverse = true, bold = true,       cterm = { reverse = true, bold = true }})
hi('StatusLineNC', { reverse = true,                    cterm = { reverse = true } })
hi('TabLineFill',  { reverse = true,                    cterm = { reverse = true } })
hi('TabLineSel',   { bold = true,                       cterm = { bold = true } })
hi('TermCursor',   { reverse = true,                    cterm = { reverse = true } })
hi('WinBar',       { bold = true,                       cterm = { bold = true } })
hi('WildMenu',     { fg = 'Black', bg = 'Yellow',       ctermfg = 'Black', ctermbg = 'Yellow' })

hi('VertSplit',      { link = 'Normal' })
hi('WinSeparator',   { link = 'VertSplit' })
hi('WinBarNC',       { link = 'WinBar' })
hi('EndOfBuffer',    { link = 'NonText' })
hi('LineNrAbove',    { link = 'LineNr' })
hi('LineNrBelow',    { link = 'LineNr' })
hi('QuickFixLine',   { link = 'Search' })
hi('CursorLineSign', { link = 'SignColumn' })
hi('CursorLineFold', { link = 'FoldColumn' })
hi('CurSearch',      { link = 'Search' })
hi('PmenuKind',      { link = 'Pmenu' })
hi('PmenuKindSel',   { link = 'PmenuSel' })
hi('PmenuExtra',     { link = 'Pmenu' })
hi('PmenuExtraSel',  { link = 'PmenuSel' })
hi('Substitute',     { link = 'Search' })
hi('Whitespace',     { link = 'NonText' })
hi('MsgSeparator',   { link = 'StatusLine' })
hi('NormalFloat',    { link = 'Pmenu' })
hi('FloatBorder',    { link = 'WinSeparator' })
hi('FloatTitle',     { link = 'Title' })
hi('FloatFooter',    { link = 'Title' })

hi('FloatShadow',          { bg = 'Black', blend=80 })
hi('FloatShadowThrough',   { bg = 'Black', blend=100 })
hi('RedrawDebugNormal',    { reverse = true,             cterm = { reverse = true } })
hi('RedrawDebugClear',     { bg = 'Yellow',              ctermbg = 'Yellow' })
hi('RedrawDebugComposed',  { bg = 'Green',               ctermbg = 'Green' })
hi('RedrawDebugRecompose', { bg = 'Red',                 ctermbg = 'Red' })
hi('Error',                { fg = 'White', bg = 'Red',   ctermfg = 'White', ctermbg = 'Red' })
hi('Todo',                 { fg = 'Blue', bg = 'Yellow', ctermfg = 'Black', ctermbg = 'Yellow' })

hi('String',         { link = 'Constant' })
hi('Character',      { link = 'Constant' })
hi('Number',         { link = 'Constant' })
hi('Boolean',        { link = 'Constant' })
hi('Float',          { link = 'Number' })
hi('Function',       { link = 'Identifier' })
hi('Conditional',    { link = 'Statement' })
hi('Repeat',         { link = 'Statement' })
hi('Label',          { link = 'Statement' })
hi('Operator',       { link = 'Statement' })
hi('Keyword',        { link = 'Statement' })
hi('Exception',      { link = 'Statement' })
hi('Include',        { link = 'PreProc' })
hi('Define',         { link = 'PreProc' })
hi('Macro',          { link = 'PreProc' })
hi('PreCondit',      { link = 'PreProc' })
hi('StorageClass',   { link = 'Type' })
hi('Structure',      { link = 'Type' })
hi('Typedef',        { link = 'Type' })
hi('Tag',            { link = 'Special' })
hi('SpecialChar',    { link = 'Special' })
hi('Delimiter',      { link = 'Special' })
hi('SpecialComment', { link = 'Special' })
hi('Debug',          { link = 'Special' })

hi('DiagnosticError',            { fg = 'Red',                          ctermfg = 1 })
hi('DiagnosticWarn',             { fg = 'Orange',                       ctermfg = 3 })
hi('DiagnosticInfo',             { fg = 'LightBlue',                    ctermfg = 4 })
hi('DiagnosticHint',             { fg = 'LightGrey',                    ctermfg = 7 })
hi('DiagnosticOk',               { fg = 'LightGreen',                   ctermfg = 10 })
hi('DiagnosticUnderlineError',   { sp = 'Red', underline = true,        cterm = { underline = true } })
hi('DiagnosticUnderlineWarn',    { sp = 'Orange', underline = true,     cterm = { underline = true } })
hi('DiagnosticUnderlineInfo',    { sp = 'LightBlue', underline = true,  cterm = { underline = true } })
hi('DiagnosticUnderlineHint',    { sp = 'LightGrey', underline = true,  cterm = { underline = true } })
hi('DiagnosticUnderlineOk',      { sp = 'LightGreen', underline = true, cterm = { underline = true } })
hi('DiagnosticVirtualTextError', { link = 'DiagnosticError' })
hi('DiagnosticVirtualTextWarn',  { link = 'DiagnosticWarn' })
hi('DiagnosticVirtualTextInfo',  { link = 'DiagnosticInfo' })
hi('DiagnosticVirtualTextHint',  { link = 'DiagnosticHint' })
hi('DiagnosticVirtualTextOk',    { link = 'DiagnosticOk' })
hi('DiagnosticFloatingError',    { link = 'DiagnosticError' })
hi('DiagnosticFloatingWarn',     { link = 'DiagnosticWarn' })
hi('DiagnosticFloatingInfo',     { link = 'DiagnosticInfo' })
hi('DiagnosticFloatingHint',     { link = 'DiagnosticHint' })
hi('DiagnosticFloatingOk',       { link = 'DiagnosticOk' })
hi('DiagnosticSignError',        { link = 'DiagnosticError' })
hi('DiagnosticSignWarn',         { link = 'DiagnosticWarn' })
hi('DiagnosticSignInfo',         { link = 'DiagnosticInfo' })
hi('DiagnosticSignHint',         { link = 'DiagnosticHint' })
hi('DiagnosticSignOk',           { link = 'DiagnosticOk' })
hi('DiagnosticDeprecated',       { sp = 'Red', strikethrough = true,    cterm = { strikethrough = true } })

hi('DiagnosticUnnecessary', { link = 'Comment' })
hi('LspInlayHint',          { link = 'NonText' })
hi('SnippetTabstop',        { link = 'Visual' })

-- Text
hi('@markup.raw',       { link = 'Comment' })
hi('@markup.link',      { link = 'Identifier' })
hi('@markup.heading',   { link = 'Title' })
hi('@markup.link.url',  { link = 'Underlined' })
hi('@markup.underline', { link = 'Underlined' })
hi('@comment.todo',     { link = 'Todo' })

-- Miscs
hi('@comment',     { link = 'Comment' })
hi('@punctuation', { link = 'Delimiter' })

-- Constants
hi('@constant',          { link = 'Constant' })
hi('@constant.builtin',  { link = 'Special' })
hi('@constant.macro',    { link = 'Define' })
hi('@keyword.directive', { link = 'Define' })
hi('@string',            { link = 'String' })
hi('@string.escape',     { link = 'SpecialChar' })
hi('@string.special',    { link = 'SpecialChar' })
hi('@character',         { link = 'Character' })
hi('@character.special', { link = 'SpecialChar' })
hi('@number',            { link = 'Number' })
hi('@boolean',           { link = 'Boolean' })
hi('@number.float',      { link = 'Float' })

-- Functions
hi('@function',                   { link = 'Function' })
hi('@function.builtin',           { link = 'Special' })
hi('@function.macro',             { link = 'Macro' })
hi('@function.method',            { link = 'Function' })
hi('@variable.parameter',         { link = 'Identifier' })
hi('@variable.parameter.builtin', { link = 'Special' })
hi('@variable.member',            { link = 'Identifier' })
hi('@property',                   { link = 'Identifier' })
hi('@attribute',                  { link = 'Macro' })
hi('@attribute.builtin',          { link = 'Special' })
hi('@constructor',                { link = 'Special' })

-- Keywords
hi('@keyword.conditional', { link = 'Conditional' })
hi('@keyword.repeat',      { link = 'Repeat' })
hi('@keyword.type',        { link = 'Structure' })
hi('@label',               { link = 'Label' })
hi('@operator',            { link = 'Operator' })
hi('@keyword',             { link = 'Keyword' })
hi('@keyword.exception',   { link = 'Exception' })

hi('@variable',          { link = 'Identifier' })
hi('@type',              { link = 'Type' })
hi('@type.definition',   { link = 'Typedef' })
hi('@module',            { link = 'Identifier' })
hi('@keyword.import',    { link = 'Include' })
hi('@keyword.directive', { link = 'PreProc' })
hi('@keyword.debug',     { link = 'Debug' })
hi('@tag',               { link = 'Tag' })
hi('@tag.builtin',       { link = 'Special' })

-- LSP semantic tokens
hi('@lsp.type.class',         { link = 'Structure' })
hi('@lsp.type.comment',       { link = 'Comment' })
hi('@lsp.type.decorator',     { link = 'Function' })
hi('@lsp.type.enum',          { link = 'Structure' })
hi('@lsp.type.enumMember',    { link = 'Constant' })
hi('@lsp.type.function',      { link = 'Function' })
hi('@lsp.type.interface',     { link = 'Structure' })
hi('@lsp.type.macro',         { link = 'Macro' })
hi('@lsp.type.method',        { link = 'Function' })
hi('@lsp.type.namespace',     { link = 'Structure' })
hi('@lsp.type.parameter',     { link = 'Identifier' })
hi('@lsp.type.property',      { link = 'Identifier' })
hi('@lsp.type.struct',        { link = 'Structure' })
hi('@lsp.type.type',          { link = 'Type' })
hi('@lsp.type.typeParameter', { link = 'TypeDef' })
hi('@lsp.type.variable',      { link = 'Identifier' })

if vim.o.background == 'light' then
  -- Default colors only used with a light background.
  hi('ColorColumn',  { bg = 'LightRed',                            ctermbg = 'LightRed' })
  hi('CursorColumn', { bg = 'Grey90',                              ctermbg = 'LightGrey' })
  hi('CursorLine',   { bg = 'Grey90',                              cterm = { underline = true } })
  hi('CursorLineNr', { fg = 'Brown', bold = true,                  ctermfg = 'Brown', cterm = { underline = true } })
  hi('DiffAdd',      { bg = 'LightBlue',                           ctermbg = 'LightBlue' })
  hi('DiffChange',   { bg = 'LightMagenta',                        ctermbg = 'LightMagenta' })
  hi('DiffDelete',   { fg = 'Blue', bg = 'LightCyan', bold = true, ctermfg = 'Blue', ctermbg = 'LightCyan' })
  hi('Directory',    { fg = 'Blue',                                ctermfg = 'DarkBlue' })
  hi('FoldColumn',   { fg = 'DarkBlue', bg = 'Grey',               ctermfg = 'DarkBlue', ctermbg = 'Grey' })
  hi('Folded',       { fg = 'DarkBlue', bg = 'LightGrey',          ctermfg = 'DarkBlue', ctermbg = 'Grey' })
  hi('LineNr',       { fg = 'Brown',                               ctermfg = 'Brown' })
  hi('MatchParen',   { bg = 'Cyan',                                ctermbg = 'Cyan' })
  hi('MoreMsg',      { fg = 'SeaGreen', bold = true,               ctermfg = 'DarkGreen' })
  hi('Pmenu',        { bg = 'LightMagenta',                        ctermfg = 'Black', ctermbg = 'LightMagenta' })
  hi('PmenuSel',     { bg = 'Grey',                                ctermfg = 'Black', ctermbg = 'LightGrey' })
  hi('PmenuThumb',   { bg = 'Black',                               ctermbg = 'Black' })
  hi('Question',     { fg = 'SeaGreen', bold = true,               ctermfg = 'DarkGreen' })
  hi('Search',       { bg = 'Yellow',                              ctermbg = 'Yellow' })
  hi('SignColumn',   { fg = 'DarkBlue', bg = 'Grey',               ctermfg = 'DarkBlue', ctermbg = 'Grey' })
  hi('SpecialKey',   { fg = 'Blue',                                ctermfg = 'DarkBlue' })
  hi('SpellBad',     { sp = 'Red', undercurl = true,               ctermbg = 'LightRed' })
  hi('SpellCap',     { sp = 'Blue', undercurl = true,              ctermbg = 'LightBlue' })
  hi('SpellLocal',   { sp = 'DarkCyan', undercurl = true,          ctermbg = 'Cyan' })
  hi('SpellRare',    { sp = 'Magenta', undercurl = true,           ctermbg = 'LightMagenta' })
  hi('TabLine',      { bg = 'LightGrey', underline = true,         ctermfg = 'Black', ctermbg = 'LightGrey', cterm = { underline = true } })
  hi('Title',        { fg = 'Magenta', bold = true,                ctermfg = 'DarkMagenta' })
  hi('Visual',       { fg = 'Black', bg = 'LightGrey',             ctermfg = 'Black', ctermbg = 'Grey' })
  hi('WarningMsg',   { fg = 'Red',                                 ctermfg = 'DarkRed' })
  hi('Comment',      { fg = 'Blue',                                ctermfg = 'DarkBlue' })
  hi('Constant',     { fg = 'Magenta',                             ctermfg = 'DarkRed' })
  hi('Special',      { fg = '#6a5acd',                             ctermfg = 'DarkMagenta' })
  hi('Identifier',   { fg = 'DarkCyan',                            ctermfg = 'DarkCyan' })
  hi('Statement',    { fg = 'Brown', bold = true,                  ctermfg = 'Brown' })
  hi('PreProc',      { fg = '#6a0dad',                             ctermfg = 'DarkMagenta' })
  hi('Type',         { fg = 'SeaGreen', bold = true,               ctermfg = 'DarkGreen' })
  hi('Underlined',   { fg = 'SlateBlue', underline = true,         ctermfg = 'DarkMagenta', cterm = { underline = true } })
  hi('Ignore',       {                                             ctermfg = 'White' })
else
  -- Default colors only used with a dark background.
  hi('ColorColumn',  { bg = 'DarkRed',                            ctermbg = 'DarkRed' })
  hi('CursorColumn', { bg = 'Grey40',                             ctermbg = 'DarkGrey' })
  hi('CursorLine',   { bg = 'Grey40',                             cterm = { underline = true } })
  hi('CursorLineNr', { fg = 'Yellow', bold = true,                ctermfg = 'Yellow', cterm = { underline = true } })
  hi('DiffAdd',      { bg = 'DarkBlue',                           ctermbg = 'DarkBlue' })
  hi('DiffChange',   { bg = 'DarkMagenta',                        ctermbg = 'DarkMagenta' })
  hi('DiffDelete',   { fg = 'Blue', bg = 'DarkCyan', bold = true, ctermfg = 'Blue', ctermbg = 'DarkCyan' })
  hi('Directory',    { fg = 'Cyan',                               ctermfg = 'LightCyan' })
  hi('FoldColumn',   { fg = 'Cyan', bg = 'Grey',                  ctermfg = 'Cyan', ctermbg = 'DarkGrey' })
  hi('Folded',       { fg = 'Cyan', bg = 'DarkGrey',              ctermfg = 'Cyan', ctermbg = 'DarkGrey' })
  hi('LineNr',       { fg = 'Yellow',                             ctermfg = 'Yellow' })
  hi('MatchParen',   { bg = 'DarkCyan',                           ctermbg = 'DarkCyan' })
  hi('MoreMsg',      { fg = 'SeaGreen', bold = true,              ctermfg = 'LightGreen' })
  hi('Pmenu',        { bg = 'Magenta',                            ctermfg = 'Black', ctermbg = 'Magenta' })
  hi('PmenuSel',     { bg = 'DarkGrey',                           ctermfg = 'DarkGrey', ctermbg = 'Black' })
  hi('PmenuThumb',   { bg = 'White',                              ctermbg = 'White' })
  hi('Question',     { fg = 'Green', bold = true,                 ctermfg = 'LightGreen' })
  hi('Search',       { fg = 'Black', bg = 'Yellow',               ctermfg = 'Black', ctermbg = 'Yellow' })
  hi('SignColumn',   { fg = 'Cyan', bg = 'Grey',                  ctermfg = 'Cyan', ctermbg = 'DarkGrey' })
  hi('SpecialKey',   { fg = 'Cyan',                               ctermfg = 'LightBlue' })
  hi('SpellBad',     { sp = 'Red', undercurl = true,              ctermbg = 'Red' })
  hi('SpellCap',     { sp = 'Blue', undercurl = true,             ctermbg = 'Blue' })
  hi('SpellLocal',   { sp = 'Cyan', undercurl = true,             ctermbg = 'Cyan' })
  hi('SpellRare',    { sp = 'Magenta', undercurl = true,          ctermbg = 'Magenta' })
  hi('TabLine',      { bg = 'DarkGrey', underline = true,         ctermfg = 'White', ctermbg = 'DarkGrey', cterm = { underline = true } })
  hi('Title',        { fg = 'Magenta', bold = true,               ctermfg = 'LightMagenta' })
  hi('Visual',       { fg = 'LightGrey', bg = '#575757',          ctermfg = 'Black', ctermbg = 'Grey' })
  hi('WarningMsg',   { fg = 'Red',                                ctermfg = 'LightRed' })
  hi('Comment',      { fg = '#80a0ff',                            ctermfg = 'Cyan' })
  hi('Constant',     { fg = '#ffa0a0',                            ctermfg = 'Magenta' })
  hi('Special',      { fg = 'Orange',                             ctermfg = 'LightRed' })
  hi('Identifier',   { fg = '#40ffff',                            ctermfg = 'Cyan', cterm = { bold = true } })
  hi('Statement',    { fg = '#ffff60', bold = true,               ctermfg = 'Yellow' })
  hi('PreProc',      { fg = '#ff80ff',                            ctermfg = 'LightBlue' })
  hi('Type',         { fg = '#60ff60', bold = true,               ctermfg = 'LightGreen' })
  hi('Underlined',   { fg = '#80a0ff', underline = true,          ctermfg = 'LightBlue', cterm = { underline = true } })
  hi('Ignore',       {                                            ctermfg = 'Black' })
end
--stylua: ignore end

and what do you mean by that:

That script will print the main 16 terminal colors and st is by default configured at compile time and "same source" is meaningless, the config.h is locally generated.

config.h has been customized by me and I have done this countless times with different disks and this is the first time getting different colors.

Last edited by b42 (2024-10-17 09:59:43)

Offline

#12 2024-10-17 10:50:58

b42
Member
Registered: 2023-07-20
Posts: 189

Re: Why nvim processes colors differently?

Also, a bit off-topic but at the same time kind of similar situation.

Why do I get different PGP windows even though the installation is completely the same and I use the same packages and configs?

Old installation looks like this:

NnckKPJ

while the new one looks like this:

64B7L78

Even though everything is completely the same even disks are from the same brand. What is the exact reason there are differences between the systems?

Last edited by b42 (2024-10-17 10:54:38)

Offline

#13 2024-10-17 12:34:05

seth
Member
Registered: 2012-09-03
Posts: 58,994

Re: Why nvim processes colors differently?

Why do I get different PGP windows even though the installation is completely the same and I use the same packages and configs?

Because your premise is wrong? If the systems were equivalent, they'd produce the same behavior. It's not like one of your hosts doesn't feel it today or something.

Looks likey you're invoking/running different gpg-agents or pinentry implementations, the cut-off windows don't even tell what that is, just one's likely gtk and the other one ncurses.

The vim colorschemes can differ depending on the $TERM value, thoug the same st config.h will produce the same $TERM, maybe you're mis-setting it in your shell rc?
But the one you posted has barely any colors > 0xf in it hmm

The transparency might add to the confusion, but while the bright yellow might just be the bold color, the blue/green and cyan/magenta swaps suggests it's a different color scheme (notably since the 16 colors are teh same on both systems)

Please fix your posts reg. the embedded images, your last embedding attempt btw. also failed.
Don't.
Just post the URL of the image.

Online

#14 2024-10-17 16:31:06

cryptearth
Member
Registered: 2024-02-03
Posts: 1,010

Re: Why nvim processes colors differently?

seth wrote:

I'll tell you when you find a blind person and explain to them what blue looks like.

challenge accepted
I am blue/green colorblind -ish
I can separate blue and green - as long as they are two distinct areas with a clear gap in between (favourable high contrast)
bring them close to eachother and the split becomes a somewhat mixed-grey-ish gradient
place both colors in the same place like those two colored numbers tests - it's just a grey circle
same goes for the default windows xp background: I know the sky is blue and the hills are green - but for me after starring at it for some time it becomes more and more greyscale

Offline

#15 2024-10-17 17:55:04

b42
Member
Registered: 2023-07-20
Posts: 189

Re: Why nvim processes colors differently?

seth wrote:

Looks likey you're invoking/running different gpg-agents or pinentry implementations

How do I find that out?

seth wrote:

The vim colorschemes can differ depending on the $TERM value, thoug the same st config.h will produce the same $TERM, maybe you're mis-setting it in your shell rc?

shell rc is the same.




Maybe this will help. This is the default vim colorscheme from the new installation:

https://ibb.co/k0QSTSB

Interesting fact: xcompmgr and transparency does not work anymore when I set the colorscheme to default in my new installation. Maybe this will help.

Default vim colorscheme from the old installation:

https://ibb.co/TmRcChF

I am using NVIM.

Last edited by b42 (2024-10-17 18:28:39)

Offline

#16 2024-10-17 18:50:38

seth
Member
Registered: 2012-09-03
Posts: 58,994

Re: Why nvim processes colors differently?

Interesting fact: xcompmgr and transparency does not work anymore when I set the colorscheme to default in my new installation. Maybe this will help.

That doesn't make any sense at all.
Did you compile st w/ argb support?

Please don't post pictures of text, post the text.
And in this case rather a diff.

How do I find that out?

Start by identifying what you're actually seeing there.
Eg. the pid command window title/attributes etc.

---

@cryptearth

I am blue/green colorblind -ish

(What's hardly the same as being born blind tongue)

But you don't know what blue looks like, do you?
I mean if you only see a grey circle blue looks grey to you?

Online

#17 2024-10-17 19:40:12

b42
Member
Registered: 2023-07-20
Posts: 189

Re: Why nvim processes colors differently?

Did you compile st w/ argb support?

what do you mean by that? sorry, not that programming savvy.

Please don't post pictures of text, post the text.

text is exactly the same, I just want you to see the visual difference between those texts regarding colorscheme.

Start by identifying what you're actually seeing there.
Eg. the pid command window title/attributes etc.

Can you give me the command to the terminal please?

Offline

#18 2024-10-17 20:08:18

seth
Member
Registered: 2012-09-03
Posts: 58,994

Online

#19 2024-10-18 09:35:14

b42
Member
Registered: 2023-07-20
Posts: 189

Re: Why nvim processes colors differently?

I already have this patched into my st build.

and as I mentioned earlier, I use exactly the same source of st for both of my installations.

Last edited by b42 (2024-10-18 09:35:48)

Offline

#20 2024-10-18 10:18:15

cryptearth
Member
Registered: 2024-02-03
Posts: 1,010

Re: Why nvim processes colors differently?

seth wrote:

I am blue/green colorblind -ish

(What's hardly the same as being born blind tongue)

But you don't know what blue looks like, do you?
I mean if you only see a grey circle blue looks grey to you?

Dang - missed the part "blind" as in "completely blind" ...
anyway - it's yet a bit different:
I have no problems with the blue-ish theme here on this forum - I can differ the blue links from thier grey background
and even in the screenshots I can tell the colors correctly: black, red, green, yellow, blue, magenta, cyan, white - but it's only the yellow and the magenta border the blue that enables me to differ it from the green and cyan
if the would be next to each other it would be just a fat grey stripe for me

Offline

#21 2024-10-18 13:07:34

seth
Member
Registered: 2012-09-03
Posts: 58,994

Re: Why nvim processes colors differently?

@b42, that was an answer to your question what I'd mean w/ argb support.

Either way: the difference isn't in st, but those are not the same vim color schemes.
Why you end up w/ different schemes is impossible to say if you constrain the information to repeating "i use the same i use the same i use the same" - you're obviously not.
1. Try to run nvim in xterm on either system - do they look the same or still different?
2. set the colorscheme to solarized on both systems. Do those looks the same (in st and xterm)?

Online

#22 2024-10-18 14:00:01

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: Why nvim processes colors differently?

In post #7 you showed an image from the old and new installation showing the same colors in the terminal (outside of nvim) - but in both of these images the terminal was opaque.  In every case that you've shown a difference in colors, either both terminals had transparency or (worse yet) one of them did and the other didn't.  Clearly there are many things changing here and this is all comparing apples to oranges.  And as seth has reiterated a few times, clearly you have configured something differently, and the first goal is to identify what that is - at that point the solution should be obvious.

Another thing seth has reiterated many times is a request that you edit your posts to remove the large images from the forum.  This is a forum rule which you violated, you were politely instructed on how to fix it, and reminded to fix it, yet you persist in ignoring all of this.  Certainly a large image is not the end of the world, but willfully ignoring our community standards will at some point wear out your welcome.  Fix your posts now.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#23 2024-10-18 14:03:28

b42
Member
Registered: 2023-07-20
Posts: 189

Re: Why nvim processes colors differently?

seth wrote:

1. Try to run nvim in xterm on either system - do they look the same or still different?
2. set the colorscheme to solarized on both systems. Do those looks the same (in st and xterm)?


1. I ran it in xterm and st and colorscheme looks the same to me:

https://ibb.co/b11hDQY

2. It is weird but there is no solarized colorscheme anymore. So I set them both to 'desert'. Looks the same to me:

https://ibb.co/cwbMLs7



Interesting thing that if I choose any other colorscheme than 'vim' on st, alpha patch does not seem to work anymore. I cannot change the transparency.

Offline

#24 2024-10-18 14:44:05

seth
Member
Registered: 2012-09-03
Posts: 58,994

Re: Why nvim processes colors differently?

Remove the alpha patch, test again.
But the idea was to test this across the different systems, xterm ./. xterm, desert ./. desert

And please fix your posts reg. the embedded images if you want this to continue.

Online

#25 2024-10-20 08:09:38

b42
Member
Registered: 2023-07-20
Posts: 189

Re: Why nvim processes colors differently?

seth wrote:

Remove the alpha patch, test again.
But the idea was to test this across the different systems, xterm ./. xterm, desert ./. desert

And please fix your posts reg. the embedded images if you want this to continue.

Posts fixed.

But the idea was to test this across the different systems, xterm ./. xterm, desert ./. desert

By this you mean get xterm running in both systems and compare them?

Then do the same with colorscheme desert? Run on both of the systems and see how they act? Am I getting this right?

Offline

Board footer

Powered by FluxBB