Class AccentColor
java.lang.Object
io.github.jbastgen.stemma.app.theme.AccentColor
The accent colour (feature 15): the orange of highlights, selected rows, primary buttons and links, which the user can
replace. From one colour the tokens of the theme are derived (hover, soft and faint tints, the text colour on it), and the
colour is moved lighter or darker until it can be read against the background of the chosen theme.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleThe least contrast (WCAG ratio) an accent must have with the background of its theme.static final String[][]The colours offered in the settings: name and hex. -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<int[]> The colour as it is used in the theme: the chosen one, darker (light theme) or lighter (dark theme) if its contrast is too low.static doublecontrastOf(String hex, Theme theme) The contrast the colour as chosen has with the background of the theme (before any adjustment).static Stringhex(int[] c) The colour as#RRGGBB.static Optional<int[]> #rrggbb(alsorrggbband#rgb) as three numbers; empty if it is none.
-
Field Details
-
MIN_CONTRAST
public static final double MIN_CONTRASTThe least contrast (WCAG ratio) an accent must have with the background of its theme.- See Also:
-
PALETTE
The colours offered in the settings: name and hex.
-
-
Method Details
-
parse
#rrggbb(alsorrggbband#rgb) as three numbers; empty if it is none. -
hex
The colour as#RRGGBB. -
contrastOf
The contrast the colour as chosen has with the background of the theme (before any adjustment). -
adjusted
The colour as it is used in the theme: the chosen one, darker (light theme) or lighter (dark theme) if its contrast is too low.
-