docs: public static Color toColor(String pString) {
          // No string, no color
          if (pString == null) {
              return null;
          }
  
          // #RRGGBB format
          if (pString.charAt(0) == '#') {
              int r = 0;
              int g = 0;
              int b = 0;
              int a = -1;// alpha
  
              if (pString.length() >= 7) {
                  int idx = 1;
  
                  // AA
                  if (pString.length() >= 9) {
                      a = Integer.parseInt(pString.substring(idx, idx + 2), 0x10);
                      idx += 2;
                  }
                  // RR GG BB
                  r = Integer.parseInt(pString.substring(idx, idx + 2), 0x10);
                  g = Integer.parseInt(pString.substring(idx + 2, idx + 4), 0x10);
                  b = Integer.parseInt(pString.substring(idx + 4, idx + 6), 0x10);
  
              }
              else if (pString.length() >= 4) {
                  int idx = 1;
  
                  // A
                  if (pString.length() >= 5) {
                      a = Integer.parseInt(pString.substring(idx, ++idx), 0x10) * 0x10;
                  }
                  // R G B
                  r = Integer.parseInt(pString.substring(idx, ++idx), 0x10) * 0x10;
                  g = Integer.parseInt(pString.substring(idx, ++idx), 0x10) * 0x10;
                  b = Integer.parseInt(pString.substring(idx, ++idx), 0x10) * 0x10;
              }
              if (a != -1) {
                  // With alpha
                  return new Color(r, g, b, a);
              }
  
              // No alpha
              return new Color(r, g, b);
          }
  
          // Get color by name
          try {
              Class colorClass = Color.class;
              Field field = null;
  
              // Workaround for stupidity in Color class constant field names
              try {
                  field = colorClass.getField(pString);
              }
              catch (Exception e) {
                  // Don't care, this is just a workaround...
              }
              if (field == null) {
                  // NOTE: The toLowerCase() on the next line will lose darkGray
                  // and lightGray...
                  field = colorClass.getField(pString.toLowerCase());
              }
  
              // Only try to get public final fields
              int mod = field.getModifiers();
  
              if (Modifier.isPublic(mod) && Modifier.isStatic(mod)) {
                  return (Color) field.get(null);
              }
          }
          catch (NoSuchFieldException nsfe) {
              // No such color, throw illegal argument?
              throw new IllegalArgumentException("No such color: " + pString);
          }
          catch (SecurityException se) {
              // Can't access field, return null
          }
          catch (IllegalAccessException iae) {
              // Can't happen, as the field must be public static
          }
          catch (IllegalArgumentException iar) {
              // Can't happen, as the field must be static
          }
  
          // This should never be reached, but you never know... ;-)
          return null;
      }