Changed colors to NCS style.
- See https://en.wikipedia.org/wiki/Natural_Color_System.
This commit is contained in:
parent
7d6d9d88eb
commit
4c58d377e2
7 changed files with 35 additions and 37 deletions
|
|
@ -196,7 +196,7 @@ def log_filesystem_changed(log, added, removed, modified):
|
|||
termstr.Color.grey_100 if stat == 0 else color)
|
||||
parts = [part(added, "added", termstr.Color.green),
|
||||
part(removed, "removed", termstr.Color.red),
|
||||
part(modified, "modified", termstr.Color.light_blue)]
|
||||
part(modified, "modified", termstr.Color.blue)]
|
||||
log.log_message("Filesystem changed: " + fill3.join(" ", parts))
|
||||
|
||||
|
||||
|
|
@ -892,8 +892,8 @@ class Screen:
|
|||
progress_bar_size):
|
||||
ordering_text = "directory" if is_directory_sort else "type "
|
||||
paused_indicator = (termstr.TermStr("paused ").fg_color(
|
||||
termstr.Color.dark_yellow) if is_paused else termstr.TermStr("running").
|
||||
fg_color(termstr.Color.light_blue))
|
||||
termstr.Color.yellow) if is_paused else termstr.TermStr("running").
|
||||
fg_color(termstr.Color.blue))
|
||||
indicators = " " + paused_indicator + f" order:{ordering_text} "
|
||||
spacing = " " * (width - len(self._STATUS_BAR) - len(indicators))
|
||||
bar = (self._STATUS_BAR[:width - len(indicators)] + spacing +
|
||||
|
|
|
|||
|
|
@ -35,20 +35,18 @@ def _cache_first_result(user_function):
|
|||
|
||||
class Color:
|
||||
|
||||
# https://en.wikipedia.org/wiki/Natural_Color_System
|
||||
black = (0, 0, 0)
|
||||
white = (255, 255, 255)
|
||||
red = (255, 0, 0)
|
||||
green = (0, 128, 0)
|
||||
blue = (0, 0, 255)
|
||||
dark_red = (139, 0, 0)
|
||||
red = (196, 2, 51)
|
||||
green = (0, 159, 107)
|
||||
blue = (0, 135, 189)
|
||||
lime = (0, 255, 0)
|
||||
yellow = (255, 255, 0)
|
||||
dark_yellow = (255, 211, 0)
|
||||
# dark_yellow = (204, 204, 0)
|
||||
yellow = (255, 211, 0)
|
||||
grey_50 = (50, 50, 50)
|
||||
grey_100 = (100, 100, 100)
|
||||
grey_150 = (150, 150, 150)
|
||||
light_blue = (90, 90, 255)
|
||||
light_blue = (173, 216, 230)
|
||||
purple = (200, 0, 200)
|
||||
brown = (150, 75, 0)
|
||||
orange = (255, 153, 0)
|
||||
|
|
|
|||
|
|
@ -54,11 +54,11 @@ class Status(enum.IntEnum):
|
|||
|
||||
|
||||
_STATUS_COLORS = {Status.ok: termstr.Color.green,
|
||||
Status.problem: termstr.Color.dark_red,
|
||||
Status.problem: termstr.Color.red,
|
||||
Status.normal: termstr.Color.grey_150,
|
||||
Status.not_applicable: termstr.Color.grey_100,
|
||||
Status.running: termstr.Color.light_blue,
|
||||
Status.paused: termstr.Color.dark_yellow,
|
||||
Status.running: termstr.Color.blue,
|
||||
Status.paused: termstr.Color.yellow,
|
||||
Status.timed_out: termstr.Color.purple}
|
||||
STATUS_MEANINGS = [
|
||||
(Status.normal, "Normal"), (Status.ok, "Ok"),
|
||||
|
|
@ -250,7 +250,7 @@ def metadata(path):
|
|||
else:
|
||||
name, value = line
|
||||
name = termstr.TermStr(name + ":").fg_color(
|
||||
termstr.Color.light_blue).ljust(16)
|
||||
termstr.Color.blue).ljust(16)
|
||||
text.append(name + fill3.join("", value) + "\n")
|
||||
return (Status.normal, fill3.Text(fill3.join("", text)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue