Bug 1823099

Summary: /etc/os-relase should use 24bit ANSI colors for ANSI_COLOR= field, to match correct Fedora blue
Product: [Fedora] Fedora Reporter: Lennart Poettering <lpoetter>
Component: fedora-releaseAssignee: Mohan Boddu <mboddu>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: bruno.thomsen, dennis, dmaphy, jdisnard, jkeating, kellin, kevin, marcandre.lureau, mboddu, ngompa13, pbrobinson, redhat-bugzilla, sgallagh, thrcka, ueberall, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-05 08:31:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Lennart Poettering 2020-04-11 16:22:58 UTC
Currently, ANSI_COLOR in /etc/os-release is set to:

    $ grep ^ANSI_COLOR /etc/os-release 
    ANSI_COLOR="0;34"

This is blue, according to the terminal emulator's palette. However, for Fedora we have a very well defined color blue:

    https://fedoraproject.org/wiki/Logo/UsageGuidelines#Colors

Hence we should use an ANSI color sequence here that matches this color precisely, by specifying the correct R/G/B parameters. i.e.

    ANSI_COLOR="38;2;60;110;180m"

To see the difference between this precise 24bit specification of blue and the paletted blue of your terminal emulator, type:

    echo -e '\e[38;2;60;110;180mfedora blue\e[0m vs. \e[0;34mplain blue\e[0m'

The difference in color varies from terminal emulator to terminal emulator.

(All relevant terminal emulators understand these sequences since a long time, including the Linux kernel)

This bug is very very important. Obviously.

Comment 1 Lennart Poettering 2020-04-12 10:10:18 UTC
To be more compatible with the original escape string, it might make sense to include a "0;" at the beginning, i.e. resetting all color first before setting the fedora foreground color. This then becomes:

    ANSI_COLOR="0;38;2;60;110;180m"

Comment 2 Lennart Poettering 2020-04-12 10:14:09 UTC
Sorry, typo, drop the final "m" (it's supposed to be added by whatever code uses this field). Here's how it should actually look like:

    ANSI_COLOR="0;38;2;60;110;180"

Comment 3 Kevin Fenzi 2020-04-12 22:31:08 UTC
PR for rawhide: https://src.fedoraproject.org/rpms/fedora-release/pull-request/120

If this is desired for upcoming Fedora 32 release, we are in Final freeze so it would need to be proposed and accepted as a Freeze break. :) 
https://fedoraproject.org/wiki/QA:SOP_freeze_exception_bug_process

Comment 4 Ben Cotton 2020-08-11 13:17:38 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.

Comment 5 Ben Cotton 2021-11-04 17:39:50 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Zbigniew Jędrzejewski-Szmek 2021-11-05 08:31:16 UTC
This has been fixed for a long time.