Skip to content

Instantly share code, notes, and snippets.

@nh2
Last active April 11, 2020 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nh2/0ae2644274099748ebdda0d1867cf346 to your computer and use it in GitHub Desktop.
Save nh2/0ae2644274099748ebdda0d1867cf346 to your computer and use it in GitHub Desktop.
Colour suggestions for git-bug, see https://github.com/MichaelMure/git-bug/issues/368
from colorama import Style, Fore, Back
components = [
'[q] Quit',
'[s] Search',
'[←↓↑→,hjkl] Navigation',
'[↵] Open bug',
'[n] New bug',
'[i] Pull',
'[o] Push',
]
print()
start = Back.BLUE
end = Style.RESET_ALL
print(start + (end + ' ' + start).join(components) + end)
print()
start = Back.LIGHTBLUE_EX
end = Style.RESET_ALL
print(start + (end + Back.BLUE + ' ' + start).join(components) + end)
print()
start = Back.CYAN
end = Style.RESET_ALL
print(start + (end + Back.BLUE + ' ' + start).join(components) + end)
print()
res = ""
for i, comp in enumerate(components):
res += Back.BLUE if i % 2 == 0 else Back.CYAN
res += ' '
res += comp
res += ' '
res += end
print(res)
print()
res = ""
for i, comp in enumerate(components):
res += Back.BLUE if i % 2 == 0 else Back.LIGHTBLUE_EX
res += ' '
res += comp
res += ' '
res += end
print(res)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment