Package net.ixdarklord.folios.api.client
Record Class GuideBook.Colors
java.lang.Object
java.lang.Record
net.ixdarklord.folios.api.client.GuideBook.Colors
- Record Components:
light- page colours by name, over the light palette (screen or handheld)dark- page colours by name, over the dark palette (screen or handheld)panel- panel colours by name: background, frame, title, detail
- Enclosing class:
- GuideBook
public static record GuideBook.Colors(Map<String,Integer> light, Map<String,Integer> dark, Map<String,Integer> panel)
extends Record
A book's colour scheme:
"colors" in book.json, each colour "#RRGGBB" (or "#AARRGGBB").
"colors": {
"paper": "#F1E7D0", "text": "#3B3026", "muted": "#8B7B66", "heading": "#2E241B",
"link": "#5A3A8A", "panel": "#E6D8BA", "line": "#C4B08C", // the page, in light mode (and a handheld book)
"dark": {"paper": "#1F222C", "text": "#D5D8E2"} // the same for dark mode
},
"panel": {"background": "#281E18", "frame": "#FFE28C", "title": "#F2E6CC", "detail": "#A89A86"}
Any colour left out keeps the style's own; the marks and rules are "accent". The panel scheme, at the top
of book.json, colours what the book shows off its pages: its tooltips, its toasts and the build guide's panel.
Left as it is, it takes on the book: its background from the cover, its frame gilt warmed by the accent. (Before,
it was "colors" › "tooltip", which is still read.)-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondark()Returns the value of thedarkrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.light()Returns the value of thelightrecord component.over(GuidePalette palette, boolean darkMode) A palette with this scheme's colours for it laid over it.panel()Returns the value of thepanelrecord component.tooltip()Deprecated.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
Method Details
-
tooltip
Deprecated.the panel scheme:panel(). -
over
A palette with this scheme's colours for it laid over it. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
light
Returns the value of thelightrecord component.- Returns:
- the value of the
lightrecord component
-
dark
Returns the value of thedarkrecord component.- Returns:
- the value of the
darkrecord component
-
panel
Returns the value of thepanelrecord component.- Returns:
- the value of the
panelrecord component
-
panel().