libmsx
C library for MSX
Loading...
Searching...
No Matches
Text color, Backdrop color

Text color, Background color, Backdrop color. More...

+ Collaboration diagram for Text color, Backdrop color:

Macros

#define fg_color(fg)    TTY_set_fg_color(fg)
 MSX Set foreground color.
 
#define bg_color(bg)    TTY_set_bg_color(bg)
 MSX Set background color.
 
#define border_color(border)    TTY_set_border_color(border)
 MSX Set border color of the screen.
 
#define text_color(fg, bg)    TTY_set_text_color(fg, bg)
 MSX Set foreground and background color.
 
#define color(fg, bg, border)    TTY_set_color(fg, bg, border)
 MSX Set foreground, background, and border color.
 

Detailed Description

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
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.

Macro Definition Documentation

◆ fg_color

#define fg_color (   fg)     TTY_set_fg_color(fg)

MSX Set foreground color.

Parameters
fgforeground color of text.

Definition at line 125 of file text.h.

◆ bg_color

#define bg_color (   bg)     TTY_set_bg_color(bg)

MSX Set background color.

Parameters
bgbackground color of text.

Definition at line 132 of file text.h.

◆ border_color

#define border_color (   border)     TTY_set_border_color(border)

MSX Set border color of the screen.

Parameters
borderborder color of the screen.

Definition at line 139 of file text.h.

◆ text_color

#define text_color (   fg,
  bg 
)     TTY_set_text_color(fg, bg)

MSX Set foreground and background color.

Parameters
fgforeground color of text.
bgbackground color of text.

Definition at line 147 of file text.h.

◆ color

#define color (   fg,
  bg,
  border 
)     TTY_set_color(fg, bg, border)

MSX Set foreground, background, and border color.

Parameters
fgforeground color of text.
bgbackground color of text.
borderborder color of the screen.

Definition at line 156 of file text.h.