aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/config.txt
diff options
context:
space:
mode:
authorBeat Bolli <bb@drbeat.li>2024-05-02 13:03:31 +0200
committerJunio C Hamano <gitster@pobox.com>2024-05-02 09:30:38 -0700
commit7b97dfe47ba3a61f09cc26154540d74afdd3283d (patch)
tree708e62c41acb95cfc085b5e5bab90f34f81fd36c /Documentation/config.txt
parentd78d692efcc734195515fd060a1f35cb5123a72d (diff)
downloadgit-7b97dfe47ba3a61f09cc26154540d74afdd3283d.tar.gz
color: add support for 12-bit RGB colors
RGB color parsing currently supports 24-bit values in the form #RRGGBB. As in Cascading Style Sheets (CSS [1]), also allow to specify an RGB color using only three digits with #RGB. In this shortened form, each of the digits is – again, as in CSS – duplicated to convert the color to 24 bits, e.g. #f1b specifies the same color as #ff11bb. In color.h, remove the '0x' prefix in the example to match the actual syntax. [1] https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color Signed-off-by: Beat Bolli <dev+git@drbeat.li> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/config.txt')
-rw-r--r--Documentation/config.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 70b448b132..6f649c997c 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -316,7 +316,8 @@ terminals, this is usually not the same as setting to "white black".
Colors may also be given as numbers between 0 and 255; these use ANSI
256-color mode (but note that not all terminals may support this). If
your terminal supports it, you may also specify 24-bit RGB values as
-hex, like `#ff0ab3`.
+hex, like `#ff0ab3`, or 12-bit RGB values like `#f1b`, which is
+equivalent to the 24-bit color `#ff11bb`.
+
The accepted attributes are `bold`, `dim`, `ul`, `blink`, `reverse`,
`italic`, and `strike` (for crossed-out or "strikethrough" letters).