proxmark3/doc/colors_notes.md

65 lines
2 KiB
Markdown
Raw Normal View History

2021-12-31 18:22:10 +08:00
# Notes on Color usage
2021-12-31 18:17:23 +08:00
<a id="Top"></a>
2020-11-29 08:35:12 +08:00
2021-12-31 18:17:23 +08:00
# Table of Contents
2021-12-31 18:22:10 +08:00
- [Notes on Color usage](#notes-on-color-usage)
2021-12-31 18:17:23 +08:00
- [Table of Contents](#table-of-contents)
- [style/color](#stylecolor)
- [Definition](#definition)
- [Styled header](#styled-header)
- [non styled header](#non-styled-header)
- [Proxspace](#proxspace)
- [Help texts](#help-texts)
2020-11-29 08:35:12 +08:00
The client should autodetect color support when starting.
You can also use the command `pref show` to see and set your personal setting.
2024-01-06 02:27:38 +08:00
Why use colors in the Proxmark3 client? When everything is white it is hard to extract the important information fast. You also need new-lines for extra space to be easier to read.
2020-11-29 08:35:12 +08:00
We have gradually been introducing this color scheme into the client since we got decent color support on all systems: OSX, Linux, WSL, Proxspace.
## style/color
^[Top](#top)
2021-12-31 18:17:23 +08:00
2020-11-29 08:35:12 +08:00
The following definition has be crystallized out from these experiments. Its not set in stone yet so take this document as a guideline for how to create unified system scheme.
### Definition
^[Top](#top)
2021-12-31 18:17:23 +08:00
2022-02-13 20:14:15 +08:00
- blue - system related headers
2020-11-29 08:35:12 +08:00
- white - normal
2022-02-13 20:14:15 +08:00
- cyan - headers, banner
2020-11-29 08:35:12 +08:00
- red - warning, error, catastrophic failures
- yellow - informative (to make things stick out from white blob)
- green - successful, (to make things stick out from white blob)
- magenta - device side messages
### Styled header
^[Top](#top)
2021-12-31 18:17:23 +08:00
2020-11-29 08:35:12 +08:00
```
PrintAndLogEx(NORMAL, "");
PrintAndLogEx(INFO, "--- " _CYAN_("Tag Information") " ---------------------------");
```
For more examples, see also all **-h** helptext now in the LUA scripts.
For the command help texts using _YELLOW_ for the example makes it very easy to see what is the command vs the description.
### non styled header
^[Top](#top)
2021-12-31 18:17:23 +08:00
2020-11-29 08:35:12 +08:00
Most commands doesn't use a header yet. We added it to make it standout (ie: yellow, green) of the informative tidbits in the output of a command.
## Proxspace
^[Top](#top)
2021-12-31 18:17:23 +08:00
2020-11-29 08:35:12 +08:00
Proxspace has support for colors.
2021-04-16 01:44:30 +08:00
## Help texts
^[Top](#top)
2021-12-31 18:17:23 +08:00
2021-04-16 01:44:30 +08:00
The help text uses a hard coded template deep inside the cliparser.c file.