Skip to content

Unexpected basic 16 terminal colors displayed on some apps #464

Description

@haxibami

On other competing terminals (e.g. alacritty, foot), colors mapped to ESC[38;5;⟨n⟩m, n in {0..15} (= 0-15 in 8-bit, 256 colors) are the same as ESC[⟨n⟩m, n in {30..37, 90..97} (= basic 16 colors), but on rio this seems not to be the case. Below is an example.

image

16colors.sh:

#!/usr/bin/env bash

echo "\$TERM: $TERM"
echo "\$COLORTERM: $COLORTERM"

for i in {30..37} {90..97}; do echo -e "\e[${i}m ESC[${i}m \e[0m"; done

for i in {0..15}; do echo -e "\e[38;5;${i}m ESC[38;5;${i}m \e[0m"; done

This affects some terminal apps, such as bottom and neofetch. These apps (probably) get basic 16 colors (9, 10, 11, ... or LightRed, LightGreen, LightYellow, ...) from 0-15 in 8-bit 256 colors, resulting in different colors being displayed on rio.

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions