Record Class FoliosPalette
java.lang.Object
java.lang.Record
net.ixdarklord.folios.api.client.page.FoliosPalette
- Record Components:
paper- the page itselftext- body textmuted- captions, hints and other quiet textheading- titles and headingsaccent- the book's colour: marks, rules, the bar of a quotelink- links in textpanel- boxes set on the page (a recipe's grid, an image's frame)line- hairlines: borders and dividers
public record FoliosPalette(int paper, int text, int muted, int heading, int accent, int link, int panel, int line)
extends Record
The colours a page is drawn in (ARGB). Pages never pick their own: the same page is ink on paper in a handheld
book and light text on a dark panel on a screen, so they draw with these.
-
Constructor Summary
ConstructorsConstructorDescriptionFoliosPalette(int paper, int text, int muted, int heading, int accent, int link, int panel, int line) Creates an instance of aFoliosPaletterecord class. -
Method Summary
Modifier and TypeMethodDescriptionintaccent()Returns the value of theaccentrecord component.static intalpha(int color, int alpha) colorwith its alpha set (0 to 255).final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intheading()Returns the value of theheadingrecord component.intline()Returns the value of thelinerecord component.intlink()Returns the value of thelinkrecord component.static intmix(int from, int to, float t) One colour a sharet(0 to 1) of the way to another, alpha included.intmuted()Returns the value of themutedrecord component.intpanel()Returns the value of thepanelrecord component.intpaper()Returns the value of thepaperrecord component.inttext()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FoliosPalette
public FoliosPalette(int paper, int text, int muted, int heading, int accent, int link, int panel, int line) Creates an instance of aFoliosPaletterecord class.- Parameters:
paper- the value for thepaperrecord componenttext- the value for thetextrecord componentmuted- the value for themutedrecord componentheading- the value for theheadingrecord componentaccent- the value for theaccentrecord componentlink- the value for thelinkrecord componentpanel- the value for thepanelrecord componentline- the value for thelinerecord component
-
-
Method Details
-
alpha
public static int alpha(int color, int alpha) colorwith its alpha set (0 to 255). -
mix
public static int mix(int from, int to, float t) One colour a sharet(0 to 1) of the way to another, alpha included. -
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 with '=='. -
paper
public int paper()Returns the value of thepaperrecord component.- Returns:
- the value of the
paperrecord component
-
text
public int text()Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
muted
public int muted()Returns the value of themutedrecord component.- Returns:
- the value of the
mutedrecord component
-
heading
public int heading()Returns the value of theheadingrecord component.- Returns:
- the value of the
headingrecord component
-
accent
public int accent()Returns the value of theaccentrecord component.- Returns:
- the value of the
accentrecord component
-
link
public int link()Returns the value of thelinkrecord component.- Returns:
- the value of the
linkrecord component
-
panel
public int panel()Returns the value of thepanelrecord component.- Returns:
- the value of the
panelrecord component
-
line
public int line()Returns the value of thelinerecord component.- Returns:
- the value of the
linerecord component
-