Class ColorPalette

java.lang.Object
com.pixelmonmod.api.client.screen.ColorPalette

public class ColorPalette extends Object
  • Field Details

  • Method Details

    • getOrCreate

      public static ColorPalette getOrCreate(String id)
      Creates a new color palette, or retrieves an existing one. This palette can then be populated with color matrices for use in modular screens.
      Parameters:
      id - The unique ID of this palette.
      Returns:
      A new color palette object, or the existing color palette with the given ID.
    • table

      Creates a new color table builder linked to this palette. A color table is a collection of colors, designed to allow interfaces to be created for multiple user-chosen styles at once, in this case light/dark mode, vanilla/smooth mode.
      Parameters:
      table - The unique ID of this new table.
      Returns:
      A new table builder linked to this palette.
    • get

      public Color get(String table, ScreenStyle.Design design, ScreenStyle.ColorScheme colorScheme)
      Retrieves a color from a given table for the given styles. If the given table does not exist, -1 will be returned from the empty table instead.
      Parameters:
      table - The table to retrieve a color from.
      design - The current screen design.
      colorScheme - The current screen color scheme.
      Returns:
      The found color, or -1 if not found.