From 053544d1927d66ccbb322d2dec7d0e0a34d74bd0 Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Mon, 23 Jan 2017 17:53:53 -0800 Subject: [PATCH] Fix inverted outset color Update the `theme` screenshot --- assets/style.toml | 24 +++++++++++++++++------- doc/examples/theme.png | Bin 4158 -> 4801 bytes src/printer.rs | 2 +- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/assets/style.toml b/assets/style.toml index b717a32..a52fca2 100644 --- a/assets/style.toml +++ b/assets/style.toml @@ -1,26 +1,36 @@ # Every field in a theme file is optional. shadow = false -borders = "simple" # Alternatives are "none" and "outset" +borders = "outset" # Alternatives are "none" and "simple" # Base colors are red, green, blue, # cyan, magenta, yellow, white and black. [colors] - background = ["454", "#923456", "401", "magenta"] - # If the value is an array, the first valid color will be used. - # If the terminal doesn't support custom color, + # There are 3 ways to select a color: + # - The 16 base colors are selected by name: + # "blue", "light red", "magenta", ... + # - Low-resolution colors use 3 characters, each <= 5: + # "541", "003", ... + # - Full-resolution colors start with '#' and can be 3 or 6 hex digits: + # "#1A6", "#123456", ... + + # If the value is an array, the first valid + # and supported color will be used. + background = ["#cdf6cd", "454", "magenta"] + + # If the terminal doesn't support custom color (like the linux TTY), # non-base colors will be skipped. shadow = ["#222288", "blue"] view = "111" - # Array and simple values have the same effect. + # An array with a single value has the same effect as a simple value. primary = ["white"] secondary = "#EEEEEE" - tertiary = "#444444" + tertiary = "#252521" # Hex values can use lower or uppercase. # (base color MUST be lowercase) - title_primary = "yellow" + title_primary = ["BLUE", "yellow"] # `BLUE` will be skipped. title_secondary = "#ffff55" # Lower precision values can use only 3 digits. diff --git a/doc/examples/theme.png b/doc/examples/theme.png index 98ca5a1463cb5f26aadae6ce3bc51a8c075141bb..3c94ae541becee0e751b5095ee7c59ccabaa26f8 100644 GIT binary patch delta 3954 zcmY+HX*k zUH|!~JMnWoI{by(<`d2rW{t-kmy2!(e|TB_=g$rrX2!2wj;Qk9_5L0kGNIn|obHD@ zf_=8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_p|R&*9S<=^7X0DeM+7(IE#I5pIY4vFTRM>@UEQB?Iv9=Emkcz<{4`hbgaJLHe)3b zcdnlr9Z0~B(etL<)-hH3{Q%(YK(J1P2(abbM8ickkVuB5rLe=?-1G8PhD_!kp=FDL zG?Uod5A#%R;YS6!GTb>c7RyGxkQLLf!|e|&Ku&1dZE)apZ9 ze!4CtSOM0Dke7@>9Tf8W`RJMo*WeMVT0SR!aXNfuJXK+Hr-wvVG((h68NZn>#NcdE z$lJH`uhg>Yq@)(1zivB36i3DFxy^kp7`mUdeHVbWCXQIASXq)|dwS#)4@-i)!h^>} zXGiwSm}z0=H*G4>e?WIq)SI%`C31}XS*HU6{?&lq`b3;f!I%ENLe1ZPlmiWIu@+{7 z-xaA#*yyEho;+Zp0N-4SYmo2BRy(iSF0kt6rT06rZIh`~8w+z^zj!oT_EE(8TRfn~ zz({RsBl=u>xgEBQV3H1E{Yy?NX+;XKAk#*G*e3>`KueS}=xvv|rHGU(VODeVV{Ik3 z(*)T~^Mc;lQop9J`kU-tw(G{{@!6zEz2cB?(=&RSSiie2wlbb0uRX+9+ahJ}Li@DL zR8*aXEUL+O`$4XNrta_t3y0GI&z*#@zpJ~xoqYiMe$QWsO^IOrtI3M3DcLY)!khM$ zKnai1I{F24p4c?hHCzKLkey^P`;#!qV>v38Hz`RuMZ%CZz<}7bcA+;DLwXQV{M}}7 z(880nS#Of*e*Cxw2%KV&Wu&jU`A^unRu%-eGHLBmvRc@D-~X01AeNzjaX(}$dELNe zBUGWQGqm; Printer<'a> { { let color = match self.theme.borders { None => return, - Some(BorderStyle::Outset) if invert => ColorStyle::Secondary, + Some(BorderStyle::Outset) if invert => ColorStyle::Tertiary, _ => ColorStyle::Primary, };