Text color, Background color, Backdrop color.
More...
|
| #define | fg_color(fg) |
| | MSX Set foreground color.
|
| |
| #define | bg_color(bg) |
| | MSX Set background color.
|
| |
| #define | border_color(border) |
| | MSX Set border color of the screen.
|
| |
| #define | text_color(fg, bg) |
| | MSX Set foreground and background color.
|
| |
| #define | color(fg, bg, border) |
| | MSX Set foreground, background, and border color.
|
| |
Text color, Background color, Backdrop color.
| SCREEN mode | Text foregrond | Text background | Backdrop |
| SCREEN 0 (TEXT 1) | 16 color palette | 16 color palette | N/A |
| SCREEN 0 (TEXT 2) | 16 color palette | 16 color palette | N/A |
| SCREEN 1 (GRAPHIC 1) | 16 color palette | 16 color palette | 16 color palette |
| SCREEN 2 (GRAPHIC 2) | 16 color palette | 16 color palette | 16 color palette |
| SCREEN 4 (GRAPHIC 3) | 16 color palette | 16 color palette | 16 color palette |
| SCREEN 5 (GRAPHIC 4) | 16 color palette | 16 color palette | 16 color palette |
| SCREEN 6 (GRAPHIC 5) | 4 color palette | 4 color palette | 4 color palette |
| SCREEN 7 (GRAPHIC 6) | 16 color palette | 16 color palette | 16 color palette |
| SCREEN 8 (GRAPHIC 7) | RGB332 | RGB332 | RGB332 |
| SCREEN 10 (GRAPHIC 7 YJK/RGB) | 16 color palette | 16 color palette | 16 color palette |
| SCREEN 12 (GRAPHIC 7 YJK) | A portion of YJK | A portion of YJK | 16 color palette |
- 16 color palette (
0..15)
MSX Pre-defined 16 colors.
MSX2 16 colors out of 512 colors (RGB333).
- 4 color palette (
0..3)
MSX2 4 colors out of 512 colors (RGB333).
- RGB332 (
0..255)
MSX2 256 colors (RGB332).
- A portion of YJK (
0..255)
MSX2+ 19,268 colors (YJK)
- A single YJK color value spans 4 pixels as follows:
- 5-bits per pixel of Y component (
0..31)
- 6-bits per 4-pixels of J component (
-32..+31)
- 6-bits per 4-pixels of K component (
-32..+31)
- Note
- In YJK mode (SCREEN 12), text colors
0-255 are treated as in SCREEN 8.
-
However, a single YJK color value (especially the J and K components) spans 4 pixels. This can result in unexpected colors; in YJK mode, pixel-by-pixel coloring is difficult to achieve.
-
In mixed YJK/RGB mode (SCREEN 10), unlike YJK mode (SCREEN 12), it is possible to use YJK (12,499 colors) or a color palette (16 of 512 colors) per pixel. Therefore, in mixed YJK/RGB mode, text are drawn with a color palette of 16 colors.
◆ fg_color
Value:
void TTY_set_fg_color(uint8_t fg)
MSX Set foreground color.
MSX Set foreground color.
- Parameters
-
| fg | foreground color of text. |
Definition at line 126 of file text.h.
◆ bg_color
Value:
void TTY_set_bg_color(uint8_t bg)
MSX Set background color.
MSX Set background color.
- Parameters
-
| bg | background color of text. |
Definition at line 133 of file text.h.
◆ border_color
| #define border_color |
( |
| border | ) |
|
Value:
void TTY_set_border_color(uint8_t border)
MSX Set border color of the screen.
MSX Set border color of the screen.
- Parameters
-
| border | border color of the screen. |
Definition at line 140 of file text.h.
◆ text_color
| #define text_color |
( |
| fg, |
|
|
| bg ) |
Value:
void TTY_set_text_color(uint8_t fg, uint8_t bg)
MSX Set foreground and background color.
MSX Set foreground and background color.
- Parameters
-
| fg | foreground color of text. |
| bg | background color of text. |
Definition at line 148 of file text.h.
◆ color
| #define color |
( |
| fg, |
|
|
| bg, |
|
|
| border ) |
Value:
void TTY_set_color(uint8_t fg, uint8_t bg, uint8_t border)
MSX Set foreground, background, and border color.
MSX Set foreground, background, and border color.
- Parameters
-
| fg | foreground color of text. |
| bg | background color of text. |
| border | border color of the screen. |
Definition at line 157 of file text.h.