foresight_theme
foresight_theme, output themes: the page colors of a figure (
classic,vfd,lcd,washi,night,paper).
A theme recolors the output, never the figure: the layout draws with gnuplot's colors (black frame and text, grey grid, white page, the linetype colors) and the devices map them through map as they write. classic maps nothing, so the default output is unchanged; vfd is a vacuum fluorescent display (black glass, emissive colors, labels printed in blue, glowing data); lcd a backlit liquid crystal display (pale green glass, dark segments). washi and night are the two faces of foresight's own identity, its documentation's light and dark modes: ink on warm paper with a crimson first series, and light text on a near-black red ground with a rose first series; every series color contrasts with its ground at least 3:1 (WCAG non-text contrast). paper is a figure for a paper: the classic page with the Okabe-Ito colors (the figure adds 8 pt texts, foresight_figure set_theme). Colors other than the frame, grid, page and palette ones (an lc '#123456' of the user) are kept. A new figure takes the theme of the environment variable FORESIGHT_THEME (an unknown name ignored) until one is set (foresight_figure).
Source: src/lib/foresight_theme.F90
Dependencies
Contents
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
THEMES | character(len=*) | parameter | Theme names. |
Derived Types
theme_object
Output theme.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
name | character(len=7) | Name. | |
background | character(len=7) | Page and window background. | |
frame | character(len=7) | Border, ticks and text. | |
grid | character(len=7) | Grid lines. | |
palette | character(len=7) | Series colors replacing the linetype colors; blank: kept. | |
glow | logical | Data drawn with a glow. | |
ghost | real(kind=R8P) | Opacity of the unlit segments and cells. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
is_classic | pass(self) | Whether the theme maps nothing. |
map | pass(self) | Theme color of a layout color. |
Functions
theme_named
Theme name (see THEMES); classic for an unknown name.
Attributes: pure
Returns: type(theme_object)
function theme_named(name) result(theme)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
name | character(len=*) | in | Theme name. |
Call graph
is_classic
Whether the theme maps nothing (classic).
Attributes: elemental
Returns: logical
function is_classic(self) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(theme_object) | in | Theme. |
Call graph
map
Theme color of the layout color: the frame (black), grid (#a0a0a0), page (white) and linetype colors become the theme ones, any other color is kept.
Attributes: pure
Returns: character(len=:)
function map(self, color) result(mapped)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(theme_object) | in | Theme. | |
color | character(len=*) | in | Layout color. |
Call graph