Remove docs for 0xRRGGBB color notation

This commit is contained in:
Christian Duerr 2020-02-27 23:06:04 +00:00 committed by GitHub
parent e3f095ca96
commit 17b8bbb908
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 36 deletions

View File

@ -183,24 +183,24 @@
#colors: #colors:
# Default colors # Default colors
#primary: #primary:
# background: '0x000000' # background: '#000000'
# foreground: '0xeaeaea' # foreground: '#eaeaea'
# Bright and dim foreground colors # Bright and dim foreground colors
# #
# The dimmed foreground color is calculated automatically if it is not present. # The dimmed foreground color is calculated automatically if it is not present.
# If the bright foreground color is not set, or `draw_bold_text_with_bright_colors` # If the bright foreground color is not set, or `draw_bold_text_with_bright_colors`
# is `false`, the normal foreground color will be used. # is `false`, the normal foreground color will be used.
#dim_foreground: '0x9a9a9a' #dim_foreground: '#9a9a9a'
#bright_foreground: '0xffffff' #bright_foreground: '#ffffff'
# Cursor colors # Cursor colors
# #
# Colors which should be used to draw the terminal cursor. If these are unset, # Colors which should be used to draw the terminal cursor. If these are unset,
# the cursor color will be the inverse of the cell color. # the cursor color will be the inverse of the cell color.
#cursor: #cursor:
# text: '0x000000' # text: '#000000'
# cursor: '0xffffff' # cursor: '#ffffff'
# Selection colors # Selection colors
# #
@ -208,44 +208,44 @@
# background is unset, selection color will be the inverse of the cell colors. # background is unset, selection color will be the inverse of the cell colors.
# If only text is unset the cell text color will remain the same. # If only text is unset the cell text color will remain the same.
#selection: #selection:
# text: '0xeaeaea' # text: '#eaeaea'
# background: '0x404040' # background: '#404040'
# Normal colors # Normal colors
#normal: #normal:
# black: '0x000000' # black: '#000000'
# red: '0xd54e53' # red: '#d54e53'
# green: '0xb9ca4a' # green: '#b9ca4a'
# yellow: '0xe6c547' # yellow: '#e6c547'
# blue: '0x7aa6da' # blue: '#7aa6da'
# magenta: '0xc397d8' # magenta: '#c397d8'
# cyan: '0x70c0ba' # cyan: '#70c0ba'
# white: '0xeaeaea' # white: '#eaeaea'
# Bright colors # Bright colors
#bright: #bright:
# black: '0x666666' # black: '#666666'
# red: '0xff3334' # red: '#ff3334'
# green: '0x9ec400' # green: '#9ec400'
# yellow: '0xe7c547' # yellow: '#e7c547'
# blue: '0x7aa6da' # blue: '#7aa6da'
# magenta: '0xb77ee0' # magenta: '#b77ee0'
# cyan: '0x54ced6' # cyan: '#54ced6'
# white: '0xffffff' # white: '#ffffff'
# Dim colors # Dim colors
# #
# If the dim colors are not set, they will be calculated automatically based # If the dim colors are not set, they will be calculated automatically based
# on the `normal` colors. # on the `normal` colors.
#dim: #dim:
# black: '0x000000' # black: '#000000'
# red: '0x8c3336' # red: '#8c3336'
# green: '0x7a8530' # green: '#7a8530'
# yellow: '0x97822e' # yellow: '#97822e'
# blue: '0x506d8f' # blue: '#506d8f'
# magenta: '0x80638e' # magenta: '#80638e'
# cyan: '0x497e7a' # cyan: '#497e7a'
# white: '0x9a9a9a' # white: '#9a9a9a'
# Indexed Colors # Indexed Colors
# #
@ -253,7 +253,7 @@
# When these are not set, they're filled with sensible defaults. # When these are not set, they're filled with sensible defaults.
# #
# Example: # Example:
# `- { index: 16, color: '0xff00ff' }` # `- { index: 16, color: '#ff00ff' }`
# #
#indexed_colors: [] #indexed_colors: []
@ -281,7 +281,7 @@
#visual_bell: #visual_bell:
# animation: EaseOutExpo # animation: EaseOutExpo
# duration: 0 # duration: 0
# color: '0xffffff' # color: '#ffffff'
# Background opacity # Background opacity
# #

View File

@ -61,7 +61,7 @@ impl<'de> Deserialize<'de> for Rgb {
type Value = Rgb; type Value = Rgb;
fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str("hex color like 0xff00ff") f.write_str("hex color like #ff00ff")
} }
fn visit_str<E>(self, value: &str) -> ::std::result::Result<Rgb, E> fn visit_str<E>(self, value: &str) -> ::std::result::Result<Rgb, E>
@ -69,7 +69,7 @@ impl<'de> Deserialize<'de> for Rgb {
E: ::serde::de::Error, E: ::serde::de::Error,
{ {
Rgb::from_str(&value[..]) Rgb::from_str(&value[..])
.map_err(|_| E::custom("failed to parse rgb; expected hex color like 0xff00ff")) .map_err(|_| E::custom("failed to parse rgb; expected hex color like #ff00ff"))
} }
} }