Record Class FoliosBook.Colors

java.lang.Object
java.lang.Record
net.ixdarklord.folios.api.client.FoliosBook.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:
FoliosBook

public static record FoliosBook.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 Details

  • Constructor Details

  • Method Details

    • tooltip

      @Deprecated public Map<String,Integer> tooltip()
      Deprecated.
      the panel scheme: panel().
    • over

      public FoliosPalette over(FoliosPalette palette, boolean darkMode)
      A palette with this scheme's colours for it laid over it.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • light

      public Map<String,Integer> light()
      Returns the value of the light record component.
      Returns:
      the value of the light record component
    • dark

      public Map<String,Integer> dark()
      Returns the value of the dark record component.
      Returns:
      the value of the dark record component
    • panel

      public Map<String,Integer> panel()
      Returns the value of the panel record component.
      Returns:
      the value of the panel record component