diff options
| author | Benjamin Culkin <scorpress@gmail.com> | 2025-09-24 17:41:42 -0400 |
|---|---|---|
| committer | Benjamin Culkin <scorpress@gmail.com> | 2025-09-24 17:41:42 -0400 |
| commit | 6e7bcdee2943dab36fd21137bcc6b1afb1e01193 (patch) | |
| tree | b8971113995529f1c15e81995a87e80b3efc68e6 | |
| parent | 35cc451a5c53b23531a46eb2bff901cd63e4df09 (diff) | |
| parent | 1271863d7011c38dcbdd285f922d064e07d6d4da (diff) | |
Merge branch 'trunk' of git@ashardalon.com:bjc-utils2.git into trunk
4 files changed, 194 insertions, 0 deletions
diff --git a/base/src/examples/java/bjc/utils/examples/colors/Bead.java b/base/src/examples/java/bjc/utils/examples/colors/Bead.java new file mode 100644 index 0000000..1894a75 --- /dev/null +++ b/base/src/examples/java/bjc/utils/examples/colors/Bead.java @@ -0,0 +1,21 @@ +package bjc.utils.examples.colors; + +public class Bead { + public final ColorMod[] mods; + + /** + * Create a new white bead. + */ + public Bead() { + this.mods = new ColorMod[0]; + } + + /** + * Create a new bead with the given color mods + * + * @param mods The color mods for this bead + */ + public Bead(ColorMod... mods) { + this.mods = mods; + } +} diff --git a/base/src/examples/java/bjc/utils/examples/colors/ColorMod.java b/base/src/examples/java/bjc/utils/examples/colors/ColorMod.java new file mode 100644 index 0000000..7d8da07 --- /dev/null +++ b/base/src/examples/java/bjc/utils/examples/colors/ColorMod.java @@ -0,0 +1,12 @@ +package bjc.utils.examples.colors; + +public class ColorMod { + public final ColorNames color; + public final int amount; + + public ColorMod(ColorNames color, int amount) { + super(); + this.color = color; + this.amount = amount; + } +} diff --git a/base/src/examples/java/bjc/utils/examples/colors/ColorNames.java b/base/src/examples/java/bjc/utils/examples/colors/ColorNames.java new file mode 100644 index 0000000..2244e45 --- /dev/null +++ b/base/src/examples/java/bjc/utils/examples/colors/ColorNames.java @@ -0,0 +1,156 @@ +package bjc.utils.examples.colors; + +import static bjc.utils.examples.colors.ColorType.*; + +public enum ColorNames { + /* Primary Colors. */ + RED, GREEN, BLUE, + + /* Subtractive Primaries. */ + SUB_RED(SUBTRACTIVE), SUB_YELLOW(SUBTRACTIVE), SUB_BLUE(SUBTRACTIVE), + + /* Special Colors. */ + WHITE, BLACK, + + /* Secondary Colors. */ + /** Red + Green */ + YELLOW, + /** Green + Blue */ + CYAN, + /** Red + Blue. */ + MAGENTA, + + /* Subtractive Secondaries. */ + /** Red + Yellow. */ + SUB_ORANGE(SUBTRACTIVE), + /** Yellow + Blue. */ + SUB_GREEN(SUBTRACTIVE), + /** Blue + Red. */ + SUB_PURPLE(SUBTRACTIVE), + + /* Tertiary Colors. */ + /** Red + Yellow. */ + ORANGE, + /** Green + Yellow. */ + CHARTREUSE_GREEN, + /** Green + Cyan. */ + SPRING_GREEN, + /** Blue + Cyan. */ + AZURE, SAPPHIRE, + /** Blue + Magenta. */ + VIOLET, AMETHYST, + /** Red + Magenta. */ + ROSE, + + /* Subtractive Tertiaries. */ + /** Red + Orange. */ + SUB_CINNABAR, + /** Orange + Yellow. */ + SUB_MARIGOLD, + /** Yellow + Green. */ + SUB_LIMEGREEN, + /** Green + Blue. */ + SUB_TEAL, + /** Blue + Purple. */ + SUB_VIOLET, + /** Purple + Red. */ + SUB_MAGENTA, + + /* + * Quaternary Colors. + * + * Note that there is not one consistent set of names for these colors + */ + /** Red + Orange. */ + CORAL, VERMILLION, + /** Orange + Yellow. */ + AMBER, GOLD, + /** Yellow + Chartreuse. */ + LIME, + /** Chartreuse + Green. */ + HARLEQUIN, + /** Green + Spring Green. */ + ERIN, EMERALD, + /** Spring Green + Cyan. */ + AQUAMARINE, TURQUOISE, + /** Cyan + Azure. */ + CAPRI, SKY_BLUE, + /** Azure + Blue. */ + ROYAL_BLUE, CERULEAN, + /** Blue + Violet. */ + ULTRAVIOLET, INDIGO, + /** Violet + Magenta. */ + PURPLE, + /** Magenta + Rose. */ + BYZANTIUM, CERISE, + /** Rose + Red. */ + CRIMSON, + + /* + * Subtractive Quaternaries. + * + * The above proviso about there being no consistent names for these + * colors goes double here. + */ + /** Red + Cinnabar. */ + SUB_SCARLET, + /** Cinnabar + Orange. */ + SUB_PERSIMMON, + /** Orange + Marigold. */ + SUB_SUN, + /** Marigold + Yellow. */ + SUB_GOLDEN, + /** Yellow + Lime-green. */ + SUB_LEMON, + /** Lime-green + Green. */ + SUB_LIME, + /** Green + Teal. */ + SUB_VIRIDIAN, + /** Teal + Blue. */ + SUB_CERULEAN, + /** Blue + Violet. */ + SUB_INDIGO, + /** Violet + Purple. */ + SUB_AMETHYST, + /** Purple + Magenta. */ + SUB_AUBERGINE, + /** Magenta + Red. */ + SUB_CRIMSON, + + /* + * Special Subtractive Tertiaries. + * + * These are formed from combining two secondaries. + */ + /** Orange + Purple. */ + SUB_RUSSET, + /** Purple + Green. */ + SUB_SLATE, + /** Green + Orange. */ + SUB_CITRON, + + /* + * Special Subtractive Quaternaries. + * + * These are formed from combining two tertiaries. + */ + /** Russet + Slate. */ + SUB_PLUM, + /** Slate + Citron. */ + SUB_SAGE, + /** Citron + Russet. */ + SUB_BUFF; + + + + + public ColorType type; + + private ColorNames(ColorType type) { + this.type = type; + } + + private ColorNames() { + this(ColorType.NORMAL); + } +} diff --git a/base/src/examples/java/bjc/utils/examples/colors/ColorType.java b/base/src/examples/java/bjc/utils/examples/colors/ColorType.java new file mode 100644 index 0000000..7c67528 --- /dev/null +++ b/base/src/examples/java/bjc/utils/examples/colors/ColorType.java @@ -0,0 +1,5 @@ +package bjc.utils.examples.colors; + +public enum ColorType { + NORMAL, SUBTRACTIVE +} |
