We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 87369a2 + 2ac02a4 commit e0bc00fCopy full SHA for e0bc00f
1 file changed
src/main/java/com/iridium/iridiumcolorapi/patterns/SolidPattern.java
@@ -6,7 +6,7 @@
6
7
public class SolidPattern implements Pattern {
8
9
- java.util.regex.Pattern pattern = java.util.regex.Pattern.compile("<SOLID:([0-9A-Fa-f]{6})>");
+ java.util.regex.Pattern pattern = java.util.regex.Pattern.compile("<SOLID:([0-9A-Fa-f]{6})>|#\\{([0-9A-Fa-f]{6})}");
10
11
/**
12
* Applies a solid RGB color to the provided String.
@@ -19,6 +19,8 @@ public String process(String string) {
19
Matcher matcher = pattern.matcher(string);
20
while (matcher.find()) {
21
String color = matcher.group(1);
22
+ if (color == null) color = matcher.group(2);
23
+
24
string = string.replace(matcher.group(), IridiumColorAPI.getColor(color) + "");
25
}
26
return string;
0 commit comments