private static BossColor convertColor(BossBarColor color) {
        switch (color) {
            case PINK:
                return BossColor.PINK;
            case BLUE:
                return BossColor.BLUE;
            case RED:
                return BossColor.RED;
            case GREEN:
                return BossColor.GREEN;
            case YELLOW:
                return BossColor.YELLOW;
            case PURPLE:
                return BossColor.PURPLE;
            case WHITE:
                return BossColor.WHITE;
            default:
                return convertColor(BossBarColor.defaultColor());
        }
    }
Implementation of {@link BossBarFactory} using ViaVersion.
helper/src/main/java/me/lucko/helper/bossbar/ViaBossBarFactory.java