aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/data/Color.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/data/Color.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/data/Color.java
index 3dbbe39..9ed9d38 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/widget/data/Color.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/data/Color.java
@@ -63,6 +63,19 @@ public interface Color {
((g & 0xFF) << 8) |
(b & 0xFF);
}
+
+ /**
+ * Constructs an RGB object with 100% alpha value (no transparency)
+ *
+ * @since 2.0.0
+ */
+ public RGB(int r, int g, int b) {
+ value =
+ (0xFF << 24) |
+ ((r & 0xFF) << 16) |
+ ((g & 0xFF) << 8) |
+ (b & 0xFF);
+ }
@Override
public int toRgb() {