# Theme setup file

- About theme setup file
- BG(Background) theme
- Color theme

## TODO

- Determine theme file specifications
- Modify color picker to match theme file specifications

## About theme file

There are several types of theme file.

BG(Backgroup) theme
  File containing [BG Theme] section
  This section is background image settings
Color theme
  File containing [Color Theme] section
  This section is text color settings
Old Color Theme (obsolete)
  The [BG] section contains the text color settings.
  Color themes supported in Tera Term 4
  Loading this file is supported. But this will be deprecated

BG (background) themes and color themes may be saved in separate files, also save both in one file. File format is Windows ini file.

## BG(Background) theme

### section

"BG theme"
The "BG" section can also be read (but will be deprecated). If both are present, "BG theme" has priority.

BGDestColor
  If no background image is used, it will be filled with this color.
  Areas where the background image is not drawn are also filled with this color.
BGDestFile
  background image
  If a wildcard is containd in the file name, one of the matching files will be selected at random.
  If it is a relative path, specify a path relative to the theme file.
  The type of files that can be read depends on plugin stored in the BGSPIPath.
  Bitmaps(bmp) can be loaded without plugins.
BGDestPattern
  Background pattern
  stretch
  tile
  center
  fit_width
  fit_height
  autofit
  autofill
    FitWidth, FitHeight resizes image with aspect ratio maintained.
    AutoFit switches between FitWidth and FitHeight to adjust window and image size to avoid gaps.
BGSrc1Alpha
  Alphablend the wallpaper image in Windows.
  This value to alpha blend value the desktop image (Src1) onto the background image (Dest).
  When value is 0, the wallpaper will not be blended.
BGSrc2Color
  The color to alpha-blend entire background image.
BGSrc2Alpha
  Alphablend value
  How much to blend a solid color (Src2) onto the image of Dest and Src1.
BGTextBackAlpha
  0 - 255
  AlphaBlend value for the normal text background color. 255 is full opacity.
BGReverseTextAlpha
  0 - 255
  AlphaBlend value for reverse text background color. 255 is full opacity.
BGTextAlpha
  0 - 255
  AlphaBlend value for other text background colors. 255 is full opacity.

## color theme

### section

"Color Theme"

### name

Theme
  Theme name, value is a string.

### attribute color

VTColor
  normal text background color, SGR 0
BoldColor
  SGR 1
VTUnderlineColor
  SGR 4
BlinkColor
  SGR 5
ReverseColor
  SGR 7
URLColor
  URL text color
  Text color added when Tera Term detects a URL string
values (0 or 1), (0 or 1), (fore red), (fore green), (fore blue), (back red), (back green), (back blue)
values (0 or 1), (0 or 1), (fore), (back)
  (0 or 1)
    1=Changing from the default color.
    0=No change.
    (Not referenced in VTColor)
  (0 or 1)
    1=Enable custom colors for text attributes (such as Bold attribute).
    0=Disable.
    (Not referenced in VTColor)
  (fore red), (fore green), (fore blue)
    Text color, each value from 0 to 255.
  (back red), (back green), (back blue)
    Background color, each from 0 to 255.
  (fore), (back)
    #RRBBGG format, each value from 0 to ff

### ANSI color

First 16 colors when 256 ANSI colors or 16 ANSI colors.
Dark colors are not used when 8 colors.

ANSIColor=(0 or 1)
  1=Changing from the default color.
  0=No change.

Fore
  256 ANSI color 15
  Normal text color(VTColor is used)
Back
  256 ANSI color 0
  Normal background color(VTColor is used)
Red
Green
Yellow
Blue
Magenta
Cyan
DarkFore
DarkBack
DarkRed
DarkGreen
DarkYellow
DarkBlue
DarkMagenta
DarkCyan
  Each color
Values are (red), (green), (blue)
  from 0 to 255
value (color)
  #RRBBGG format, from 00 to ff