Class ColorHarmony

java.lang.Object
com.github.darksoulq.abyssallib.common.color.ColorHarmony

public final class ColorHarmony extends Object
A utility class for generating various color harmony palettes based on color theory.

This class provides methods to create sets of colors that work well together, such as complementary, triadic, and analogous schemes, as well as tonal variations.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    analogous(org.bukkit.Color base)
    Generates an analogous palette based on the given color.
    complementary(org.bukkit.Color base)
    Generates a complementary palette consisting of the base color and its opposite.
    monochromatic(org.bukkit.Color base)
    Generates a monochromatic palette based on the given color.
    shades(org.bukkit.Color base, int steps)
    Generates a palette of shades by transitioning the base color toward black.
    splitComplementary(org.bukkit.Color base)
    Generates a split-complementary palette.
    tetradic(org.bukkit.Color base)
    Generates a tetradic (double-complementary) palette.
    tints(org.bukkit.Color base, int steps)
    Generates a palette of tints by transitioning the base color toward white.
    tones(org.bukkit.Color base, int steps)
    Generates a palette of tones by transitioning the base color toward gray.
    triadic(org.bukkit.Color base)
    Generates a triadic palette.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ColorHarmony

      public ColorHarmony()
  • Method Details

    • monochromatic

      public static ColorPalette monochromatic(org.bukkit.Color base)
      Generates a monochromatic palette based on the given color.

      Monochromatic schemes are derived from a single base hue and extended using its shades, tones, and tints.

      Parameters:
      base - The base Color to use as the root of the palette.
      Returns:
      A ColorPalette containing monochromatic variations.
    • analogous

      public static ColorPalette analogous(org.bukkit.Color base)
      Generates an analogous palette based on the given color.

      Analogous colors are groups of colors that are adjacent to each other on the color wheel, typically creating serene and comfortable designs.

      Parameters:
      base - The base Color to use.
      Returns:
      A ColorPalette containing the base and its neighbors.
    • complementary

      public static ColorPalette complementary(org.bukkit.Color base)
      Generates a complementary palette consisting of the base color and its opposite.

      Complementary colors provide high contrast and high impact when used together.

      Parameters:
      base - The base Color to use.
      Returns:
      A ColorPalette containing the base and its complement.
    • splitComplementary

      public static ColorPalette splitComplementary(org.bukkit.Color base)
      Generates a split-complementary palette.

      This uses a base color and the two colors adjacent to its complement. It provides high contrast but with less tension than a standard complementary scheme.

      Parameters:
      base - The base Color to use.
      Returns:
      A ColorPalette containing split-complementary colors.
    • triadic

      public static ColorPalette triadic(org.bukkit.Color base)
      Generates a triadic palette.

      Triadic harmonies use three colors that are evenly spaced (120 degrees apart) around the color wheel, tending to be quite vibrant.

      Parameters:
      base - The base Color to use.
      Returns:
      A ColorPalette containing triadic variations.
    • tetradic

      public static ColorPalette tetradic(org.bukkit.Color base)
      Generates a tetradic (double-complementary) palette.

      This scheme uses four colors arranged into two complementary pairs, offering plenty of possibilities for variation.

      Parameters:
      base - The base Color to use.
      Returns:
      A ColorPalette containing tetradic variations.
    • shades

      public static ColorPalette shades(org.bukkit.Color base, int steps)
      Generates a palette of shades by transitioning the base color toward black.
      Parameters:
      base - The base Color to shade.
      steps - The number of steps (colors) in the resulting palette.
      Returns:
      A ColorPalette representing the transition to black.
    • tints

      public static ColorPalette tints(org.bukkit.Color base, int steps)
      Generates a palette of tints by transitioning the base color toward white.
      Parameters:
      base - The base Color to tint.
      steps - The number of steps (colors) in the resulting palette.
      Returns:
      A ColorPalette representing the transition to white.
    • tones

      public static ColorPalette tones(org.bukkit.Color base, int steps)
      Generates a palette of tones by transitioning the base color toward gray.
      Parameters:
      base - The base Color to tone.
      steps - The number of steps (colors) in the resulting palette.
      Returns:
      A ColorPalette representing the transition to gray.