Class OverlayPalette

java.lang.Object
privbot.ui.overlay.OverlayPalette

public final class OverlayPalette extends Object
The resolved colours of one overlay: the scheme's, with a custom scheme's per-colour overrides. User-chosen colours reach a Graphics2D only through here.

Every colour is OPAQUE RGB. Transparency comes from the opacity setting: apply it to background exactly as OverlayTheme.cardBackground(int) does (alpha = round(pct * 255 / 100)). Classic's card was (18, 20, 26, 200) with a (51, 58, 72, 180) border; the palette keeps the RGB and drops those alphas, so a caller gives the border the card's alpha (or OverlayTheme.CARD_BORDER's own 180 for Classic's exact look).

A line's own value colour wins over its status colour; LEVEL progress bars use accent.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final Color
    The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
    final Color
    The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
    final Color
    The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
    final Color
    The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
    final Color
    The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
    final Color
    The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
    final Color
    The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
    final Color
    The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
    final Color
    The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
    final Color
    The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
  • Method Summary

    Modifier and Type
    Method
    Description
    of(PaletteSettings settings)
    The palette a plugin's user chose: the built-in scheme's colours, or for PaletteSettings.Scheme.CUSTOM Classic's with each colour the settings give put in its place.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • background

      public final Color background
      The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
    • border

      public final Color border
      The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
    • title

      public final Color title
      The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
    • label

      public final Color label
      The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
    • value

      public final Color value
      The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
    • accent

      public final Color accent
      The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
    • info

      public final Color info
      The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
    • good

      public final Color good
      The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
    • warn

      public final Color warn
      The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
    • muted

      public final Color muted
      The resolved colours, all opaque: card background and border, title, row label and value, accent (LEVEL bars), and the status colours info, good, warn, muted.
  • Method Details

    • of

      public static OverlayPalette of(PaletteSettings settings)
      The palette a plugin's user chose: the built-in scheme's colours, or for PaletteSettings.Scheme.CUSTOM Classic's with each colour the settings give put in its place.
      Parameters:
      settings - the user's choice; null, or a null scheme, is Classic
      Returns:
      the palette, all colours opaque