gluegun icon indicating copy to clipboard operation
gluegun copied to clipboard

New colors theme method and improved colors theme docs

Open blake-mealey opened this issue 4 years ago • 2 comments

Hey, a couple of quick suggestions I'm happy to submit a PR for if you're interested:

  1. Add a new colors theme method command which points to magenta

I like to use a distinct and consistent color when telling the user they can use another command to help with something (e.g. from my CLI `This action requires a logged in user. Run ${magenta(`${brand} login`)} to log in.`). Currently the default command prints `Type ${magenta(`${brand} --help`)} to view common commands.` so I think magenta is a good candidate for this.

  1. Document all the theme methods in the docs

Currently the docs don't document the following theme methods:

  • highlight
  • line

I especially wanted to use the same consistent highlight color as the default commands, and had been using cyan until I was snooping through the source and discovered the highlight method. I think it would be useful to expose all of them.

blake-mealey avatar Oct 14 '20 20:10 blake-mealey

Just submitted a PR which does what I think you want (instead of command, I just named it highlight). Hope it helps :+1:

kathawala avatar Jan 16 '21 19:01 kathawala

@kathawala not quite what I was after. I can already access the highlight color from the print.colors object. I would like a new color called command which is an alias for magenta. I also don't want it to print the full line that color, so I'd still want it to be part of the colors object.

blake-mealey avatar Jan 16 '21 21:01 blake-mealey