if (ColorValidator.isShortModeWithoutAlpha(color)) { red = getRFromString(color); green = getGFromString(color); blue = getBFromString(color); alpha = 1.0f; green = getGFromString(color); blue = getBFromString(color); alpha = 1.0f; green = getGFromString(color); blue = getBFromString(color); alpha = getAFromString(color);
public void fromStringWithoutAlpha(@Nonnull final String color) { colorString = color + toHex(alpha); if (ColorValidator.isShortModeWithoutAlpha(color)) { red = getRFromString(color); green = getGFromString(color); blue = getBFromString(color); } else if (ColorValidator.isLongModeWithoutAlpha(color)) { red = getRFromString(color); green = getGFromString(color); blue = getBFromString(color); } else if (ColorValidator.isValid(color)) { red = getRFromString(color); green = getGFromString(color); blue = getBFromString(color); } else { red = green = blue = 1.0f; } }