github.com/Aoi-hosizora/ahlib@v1.5.1-0.20230404072829-241b93cf91c7/xcolor/README.md (about)

     1  # xcolor
     2  
     3  ## Dependencies
     4  
     5  + (xtesting)
     6  
     7  ## Documents
     8  
     9  ### Types
    10  
    11  + `type Style uint8`
    12  + `type Color uint8`
    13  + `type Background uint8`
    14  + `type MixCode []uint8`
    15  
    16  ### Variables
    17  
    18  + None
    19  
    20  ### Constants
    21  
    22  + `const Bold Style`
    23  + `const Faint Style`
    24  + `const Italic Style`
    25  + `const Underline Style`
    26  + `const Reverse Style`
    27  + `const Strikethrough Style`
    28  + `const Black Color`
    29  + `const Red Color`
    30  + `const Green Color`
    31  + `const Yellow Color`
    32  + `const Blue Color`
    33  + `const Magenta Color`
    34  + `const Cyan Color`
    35  + `const White Color`
    36  + `const Default Color`
    37  + `const BrightBlack Color`
    38  + `const BrightRed Color`
    39  + `const BrightGreen Color`
    40  + `const BrightYellow Color`
    41  + `const BrightBlue Color`
    42  + `const BrightMagenta Color`
    43  + `const BrightCyan Color`
    44  + `const BrightWhite Color`
    45  + `const BGBlack Background`
    46  + `const BGRed Background`
    47  + `const BGGreen Background`
    48  + `const BGYellow Background`
    49  + `const BGBlue Background`
    50  + `const BGMagenta Background`
    51  + `const BGCyan Background`
    52  + `const BGWhite Background`
    53  + `const BGDefault Background`
    54  + `const BGBrightBlack Background`
    55  + `const BGBrightRed Background`
    56  + `const BGBrightGreen Background`
    57  + `const BGBrightYellow Background`
    58  + `const BGBrightBlue Background`
    59  + `const BGBrightMagenta Background`
    60  + `const BGBrightCyan Background`
    61  + `const BGBrightWhite Background`
    62  
    63  ### Functions
    64  
    65  + `func InitTerminal(out io.Writer) bool`
    66  + `func ForceColor()`
    67  
    68  ### Methods
    69  
    70  + `func (s Style) String() string`
    71  + `func (s Style) Code() string`
    72  + `func (s Style) WithStyle(s2 Style) MixCode`
    73  + `func (s Style) WithColor(c Color) MixCode`
    74  + `func (s Style) WithBackground(b Background) MixCode`
    75  + `func (s Style) Print(v ...interface{})`
    76  + `func (s Style) Printf(f string, v ...interface{})`
    77  + `func (s Style) Println(v ...interface{})`
    78  + `func (s Style) Sprint(v ...interface{}) string`
    79  + `func (s Style) Sprintf(f string, v ...interface{}) string`
    80  + `func (s Style) Sprintln(v ...interface{}) string`
    81  + `func (s Style) Fprint(w io.Writer, v ...interface{}) (n int, err error)`
    82  + `func (s Style) Fprintf(w io.Writer, f string, v ...interface{}) (n int, err error)`
    83  + `func (s Style) Fprintln(w io.Writer, v ...interface{}) (n int, err error)`
    84  + `func (s Style) APrint(a int, v ...interface{})`
    85  + `func (s Style) APrintf(a int, f string, v ...interface{})`
    86  + `func (s Style) APrintln(a int, v ...interface{})`
    87  + `func (s Style) ASprint(a int, v ...interface{}) string`
    88  + `func (s Style) ASprintf(a int, f string, v ...interface{}) string`
    89  + `func (s Style) ASprintln(a int, v ...interface{}) string`
    90  + `func (s Style) AFprint(a int, w io.Writer, v ...interface{}) (n int, err error)`
    91  + `func (s Style) AFprintf(a int, w io.Writer, f string, v ...interface{}) (n int, err error)`
    92  + `func (s Style) AFprintln(a int, w io.Writer, v ...interface{}) (n int, err error)`
    93  + `func (c Color) String() string`
    94  + `func (c Color) Code() string`
    95  + `func (c Color) WithStyle(s Style) MixCode`
    96  + `func (c Color) WithBackground(b Background) MixCode`
    97  + `func (c Color) Print(v ...interface{})`
    98  + `func (c Color) Printf(f string, v ...interface{})`
    99  + `func (c Color) Println(v ...interface{})`
   100  + `func (c Color) Sprint(v ...interface{}) string`
   101  + `func (c Color) Sprintf(f string, v ...interface{}) string`
   102  + `func (c Color) Sprintln(v ...interface{}) string`
   103  + `func (c Color) Fprint(w io.Writer, v ...interface{}) (n int, err error)`
   104  + `func (c Color) Fprintf(w io.Writer, f string, v ...interface{}) (n int, err error)`
   105  + `func (c Color) Fprintln(w io.Writer, v ...interface{}) (n int, err error)`
   106  + `func (c Color) APrint(a int, v ...interface{})`
   107  + `func (c Color) APrintf(a int, f string, v ...interface{})`
   108  + `func (c Color) APrintln(a int, v ...interface{})`
   109  + `func (c Color) ASprint(a int, v ...interface{}) string`
   110  + `func (c Color) ASprintf(a int, f string, v ...interface{}) string`
   111  + `func (c Color) ASprintln(a int, v ...interface{}) string`
   112  + `func (c Color) AFprint(a int, w io.Writer, v ...interface{}) (n int, err error)`
   113  + `func (c Color) AFprintf(a int, w io.Writer, f string, v ...interface{}) (n int, err error)`
   114  + `func (c Color) AFprintln(a int, w io.Writer, v ...interface{}) (n int, err error)`
   115  + `func (b Background) String() string`
   116  + `func (b Background) Code() string`
   117  + `func (b Background) WithStyle(s Style) MixCode`
   118  + `func (b Background) WithColor(c Color) MixCode`
   119  + `func (b Background) Print(v ...interface{})`
   120  + `func (b Background) Printf(f string, v ...interface{})`
   121  + `func (b Background) Println(v ...interface{})`
   122  + `func (b Background) Sprint(v ...interface{}) string`
   123  + `func (b Background) Sprintf(f string, v ...interface{}) string`
   124  + `func (b Background) Sprintln(v ...interface{}) string`
   125  + `func (b Background) Fprint(w io.Writer, v ...interface{}) (n int, err error)`
   126  + `func (b Background) Fprintf(w io.Writer, f string, v ...interface{}) (n int, err error)`
   127  + `func (b Background) Fprintln(w io.Writer, v ...interface{}) (n int, err error)`
   128  + `func (b Background) APrint(a int, v ...interface{})`
   129  + `func (b Background) APrintf(a int, f string, v ...interface{})`
   130  + `func (b Background) APrintln(a int, v ...interface{})`
   131  + `func (b Background) ASprint(a int, v ...interface{}) string`
   132  + `func (b Background) ASprintf(a int, f string, v ...interface{}) string`
   133  + `func (b Background) ASprintln(a int, v ...interface{}) string`
   134  + `func (b Background) AFprint(a int, w io.Writer, v ...interface{}) (n int, err error)`
   135  + `func (b Background) AFprintf(a int, w io.Writer, f string, v ...interface{}) (n int, err error)`
   136  + `func (b Background) AFprintln(a int, w io.Writer, v ...interface{}) (n int, err error)`
   137  + `func (m MixCode) String() string`
   138  + `func (m MixCode) Codes() []uint8`
   139  + `func (m MixCode) WithStyle(s Style) MixCode`
   140  + `func (m MixCode) WithColor(c Color) MixCode`
   141  + `func (m MixCode) WithBackground(b Background) MixCode`
   142  + `func (m MixCode) Print(v ...interface{})`
   143  + `func (m MixCode) Printf(f string, v ...interface{})`
   144  + `func (m MixCode) Println(v ...interface{})`
   145  + `func (m MixCode) Sprint(v ...interface{}) string`
   146  + `func (m MixCode) Sprintf(f string, v ...interface{}) string`
   147  + `func (m MixCode) Sprintln(v ...interface{}) string`
   148  + `func (m MixCode) Fprint(w io.Writer, v ...interface{}) (n int, err error)`
   149  + `func (m MixCode) Fprintf(w io.Writer, f string, v ...interface{}) (n int, err error)`
   150  + `func (m MixCode) Fprintln(w io.Writer, v ...interface{}) (n int, err error)`
   151  + `func (m MixCode) APrint(a int, v ...interface{})`
   152  + `func (m MixCode) APrintf(a int, f string, v ...interface{})`
   153  + `func (m MixCode) APrintln(a int, v ...interface{})`
   154  + `func (m MixCode) ASprint(a int, v ...interface{}) string`
   155  + `func (m MixCode) ASprintf(a int, f string, v ...interface{}) string`
   156  + `func (m MixCode) ASprintln(a int, v ...interface{}) string`
   157  + `func (m MixCode) AFprint(a int, w io.Writer, v ...interface{}) (n int, err error)`
   158  + `func (m MixCode) AFprintf(a int, w io.Writer, f string, v ...interface{}) (n int, err error)`
   159  + `func (m MixCode) AFprintln(a int, w io.Writer, v ...interface{}) (n int, err error)`