Record Class GuidePalette
java.lang.Object
java.lang.Record
net.ixdarklord.folios.api.client.page.GuidePalette
- 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 GuidePalette(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
ConstructorsConstructorDescriptionGuidePalette(int paper, int text, int muted, int heading, int accent, int link, int panel, int line) Creates an instance of aGuidePaletterecord 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
-
GuidePalette
public GuidePalette(int paper, int text, int muted, int heading, int accent, int link, int panel, int line) Creates an instance of aGuidePaletterecord 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
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
paper
-
text
-
muted
-
heading
-
accent
-
link
-
panel
-
line
-