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 (and handheld) palettedark- page colours by name, over a screen book's dark palettetooltip- tooltip 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> tooltip)
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 a screen book's dark mode
"tooltip": {"background": "#281E18", "frame": "#FFE28C", "title": "#F2E6CC", "detail": "#A89A86"}
}
Any colour left out keeps the style's own; the marks and rules are "accent". A tooltip left as it is
takes on the book: its background from the cover, its frame gilt warmed by the accent.-
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.tooltip()Returns the value of thetooltiprecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
Method Details
-
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
-
tooltip
Returns the value of thetooltiprecord component.- Returns:
- the value of the
tooltiprecord component
-