Replies: 1 comment
-
You could probably even implement something like this with some abstraction (what blade is to HTML perhaps) to use your design tokens (colors in our case) in the frontend: https://css-tricks.com/css-variables-with-php/ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I'd like to propose a new Color helper within Illuminate\Support that would simplify and enhance color management in Laravel applications. This helper would provide developers with a set of tools to work with colors effectively, including color palettes, contrast functions, and utilities for handling various color formats (hex, RGB, HSL, etc.).
Motivation
Currently, Laravel lacks built-in support for color manipulation, which is a common requirement in projects involving theming, visual customizations, and dynamically generated UI components. Developers are often required to rely on third-party packages or write custom functions for these purposes, which can lead to inconsistencies and redundant code across projects. By adding a dedicated Color helper, Laravel could offer a cohesive and standardized approach to color handling.
Proposed Features
Here are some initial ideas for what the Color helper could offer:
Beta Was this translation helpful? Give feedback.
All reactions