The goal of this issue is to enable the user to provide their own CSS values for the ones hard-coded here:
|
// Convert a 4 bits color code to its css color: https://en.wikipedia.org/wiki/ANSI_escape_code#3-bit_and_4-bit |
|
let fourBitColors = (code: int): option(string) => |
|
switch (code) { |
|
| 00 => "black"->Some |
|
| 01 => "red"->Some |
|
| 02 => "green"->Some |
|
| 03 => "yellow"->Some |
|
| 04 => "blue"->Some |
|
| 05 => "magenta"->Some |
|
| 06 => "cyan"->Some |
|
| 07 => "white"->Some |
|
| 09 => "initial"->Some |
|
| 10 => "grey"->Some |
|
| 11 => "#DA2647"->Some |
|
| 12 => "#87FF2A"->Some |
|
| 13 => "#FFF700"->Some |
|
| 14 => "#5DADEC"->Some |
|
| 15 => "#FF3399"->Some |
|
| 16 => "#8DD9CC"->Some |
|
| 17 => "white"->Some |
.
In particular, we need to enable the user to provide their own initial value for the code 9, as documented in #3
To do that, we could:
- add an optional
fourBitColors function property to the React component, or
- define a color palete type property, and modify the existing
fourBitColors function to use that instead.
When color themes is implemented, it might be good to also provide default themes, such as dark, light, and their solarized version.
The goal of this issue is to enable the user to provide their own CSS values for the ones hard-coded here:
re-ansi/src/Ansi.re
Lines 37 to 56 in 6e07d47
In particular, we need to enable the user to provide their own
initialvalue for the code 9, as documented in #3To do that, we could:
fourBitColorsfunction property to the React component, orfourBitColorsfunction to use that instead.When color themes is implemented, it might be good to also provide default themes, such as
dark,light, and their solarized version.