-
-
Notifications
You must be signed in to change notification settings - Fork 0
Ansi Codeblock Styles #2
Description
```ansi
{content}
```
It can be assumed that all characters included in a code block continue to contribute to the message length (despite not being visible to the user after sending). Styles can be compounded together as a possible avenue to 'save message credit' (in this sense I refer to a character as a cost to the message, similar to how API rate limits work - but for the payload itself).
- Escape code:
\x1B - Escape sequence:
�[{code};{code};...m{content}�[0m
This can be quite hard to achieve in the user interface, but once you have the code on your clipboard - it should be fine provided you keep note of it somewhere. This has been created to expand the knowledge of existing styles available to the user, as indicated by Discord-Datamining/Discord-Datamining@852687a#commitcomment-63050923 which details slight differences between light and dark theme. Furthermore, this is not yet supported for mobile - which is to be added to the list as well.
Codes (Formatting)
| Code | Description |
|---|---|
| 0 | reset |
| 1 | **bold** |
| 4 | __underline__ |
I have yet to find italic or spoiler codes, though I doubt they would be included at this time.
Interesting to find out that GitHub doesn't natively support underline on text (even with a
<u>...</u>element node).
Codes (Foreground)
| Code | Hex | Colour |
|---|---|---|
| 31 | #dc322f |
Red |
| 32 | #859900 |
Green |
| 33 | #b58900 |
Yellow |
| 34 | #268bd2 |
Blue |
| 35 | #d33682 |
Magenta |
| 36 | #2aa198 |
Cyan |
Codes (Theme Compliant)
| Code | Dark Mode | Light Mode | Notes |
|---|---|---|---|
| 30 | #4f545c |
#c7ccd1 |
Using --interactive-muted CSS variable |
| 37 | #ffffff |
#060607 |
Using --interactive-active CSS variable |
Codes (Background)
'described as {colour}' is sourced from ShareX's color picker.
| Code | Hex | Colour |
|---|---|---|
| 40 | #002b36 |
Black (looks like a Midnight blue) |
| 41 | #cb4b16 |
Red (described as Chocolate) |
| 42 | #586e75 |
Green (described as Dim grey) |
| 43 | #657b83 |
Yellow (described as Slate grey) |
| 44 | #839496 |
Blue (described as Dark grey) |
| 45 | #6c71c4 |
Magenta (described as Slate blue, close to old Blurple #7289da) |
| 46 | #93a1a1 |
Cyan (described as Dark grey) |
| 47 | #fdf6e3 |
White (described as Old lace) |