hasComponentAttribute($colorAttribute)) { $colorValue = $attributes->getValueAndRemove($colorAttribute); $lowerCase = strtolower($colorValue); if (in_array($lowerCase, self::TEXT_COLORS)) { /** * The bootstrap text class * https://getbootstrap.com/docs/5.0/utilities/colors/#colors */ $attributes->addClassName("text-$lowerCase"); } else { /** * Other Text Colors */ $colorValue = ColorUtility::getColorValue($colorValue); if (!empty($colorValue)) { $attributes->addStyleDeclaration(TextColor::CSS_ATTRIBUTE, $colorValue); } } break; } } } }