diff --git a/palette/src/main/java/com/catppuccin/Color.java b/palette/src/main/java/com/catppuccin/Color.java index 2a5a6ad..b1c2b53 100644 --- a/palette/src/main/java/com/catppuccin/Color.java +++ b/palette/src/main/java/com/catppuccin/Color.java @@ -1,32 +1,56 @@ package com.catppuccin; +/** + * This class provides utility methods to provide different representations of the RGB color data. + */ public class Color { private final int r; private final int g; private final int b; + /** + * Generate a Color based on the provided RGB values + * @param r the red value + * @param b the green value + * @param g the blue value + */ public Color(int r, int b, int g) { this.r = r; this.g = g; this.b = b; } + /** + * @return the red component + */ public int r() { return this.r; } + /** + * @return the green component + */ public int g() { return this.g; } + /** + * @return the blue component + */ public int b() { return this.b; } + /** + * @return the color, as a hex string + */ public String hex() { return String.format("%02x%02x%02x", this.r(), this.g(), this.b()); } + /** + * @return the components of the color as a 3 element array + */ public int[] components() { return new int[]{ r(), diff --git a/palette/src/main/java/com/catppuccin/Palette.java b/palette/src/main/java/com/catppuccin/Palette.java index ee8caa3..9673f88 100644 --- a/palette/src/main/java/com/catppuccin/Palette.java +++ b/palette/src/main/java/com/catppuccin/Palette.java @@ -3,12 +3,30 @@ package com.catppuccin; import java.util.ArrayList; import java.util.List; +/** + * This class represents the entirety of the Catppuccin v0.2.0 palette. + */ @GeneratedPalette(target="com.catppuccin.BuiltinPalettes") public class Palette { + /** + * Mocha flavoured Catppuccin + */ public static final Flavor MOCHA = com.catppuccin.BuiltinPalettes.MOCHA; + + /** + * Macchiato flavoured Catppuccin + */ public static final Flavor MACCHIATO = com.catppuccin.BuiltinPalettes.MACCHIATO; + + /** + * Frappe flavoured Catppuccin + */ public static final Flavor FRAPPE = com.catppuccin.BuiltinPalettes.FRAPPE; + + /** + * Latte flavoured Catppuccin + */ public static final Flavor LATTE = com.catppuccin.BuiltinPalettes.LATTE; public List toList() {