Web, Rgb, Cmyk, Lab classes) enables loose coupling with business logic, reducing ad-hoc color conversions in controllers or views.php-color) may suffice.\Com\Tecnick\Color\Web) as singletons or contextual bindings in AppServiceProvider.Color::hexToRgb('#336699')) to simplify usage in Blade templates or controllers.@colorConvert) for template-based color transformations.// app/Providers/AppServiceProvider.php
Blade::directive('colorConvert', function ($hex) {
return "<?php echo \\Com\\Tecnick\\Color\\Web::hexToRgb('{$hex}')->getCssColor(); ?>";
});
<div style="color: @colorConvert('#336699')">Text</div>
Cmyk conversions) directly in PDF generation logic.str_replace hex-to-RGB hacks with \Com\Tecnick\Color\Web::getRgbObjFromHex().trigger_deprecation() in Laravel 10+).hex → json for RGB arrays) if needed.php-color or intervention/image.Schema::table('products', function (Blueprint $table) {
$table->json('color_rgb')->nullable()->after('color_hex');
});
ValidHexColor) for form inputs.GeneratePdfJob).#FF0000) using Laravel’s cache.How can I help you explore Laravel packages today?