/** * Check if the color text is written in the short form with alpha. The text * would have to look like this: {@code #rgba} * * @param toCheck the text to check * @return {@code true} in case the text is a short form color definition * with alpha */ public static boolean isShortMode(@Nullable final String toCheck) { return isColor(toCheck, 4); }
/** * Check if the color text is written in the short form without alpha. The * text would have to look like this: {@code #rgb} * * @param toCheck the text to check * @return {@code true} in case the text is a short form color definition * without alpha */ public static boolean isShortModeWithoutAlpha(@Nullable final String toCheck) { return isColor(toCheck, 3); }
/** * Check if the color text is written in the long form with alpha. The text * would have to look like this: {@code #rrggbbaa} * * @param toCheck the text to check * @return {@code true} in case the text is a long form color definition * with alpha */ public static boolean isLongMode(@Nullable final String toCheck) { return isColor(toCheck, 8); }
/** * Check if the color text is written in the long form without alpha. The text * would have to look like this: {@code #rrggbb} * * @param toCheck the text to check * @return {@code true} in case the text is a long form color definition * without alpha */ public static boolean isLongModeWithoutAlpha(@Nullable final String toCheck) { return isColor(toCheck, 6); }