Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[colorManipulator] lighten/darken a CSS var() color #43324

Open
kiddliu opened this issue Aug 16, 2024 · 4 comments
Open

[colorManipulator] lighten/darken a CSS var() color #43324

kiddliu opened this issue Aug 16, 2024 · 4 comments
Assignees
Labels
customization: theme Centered around the theming features new feature New feature or request package: system Specific to @mui/system

Comments

@kiddliu
Copy link

kiddliu commented Aug 16, 2024

Summary

Hi, I'm working on my own design system implementation with MUI v6 (base + system). Previously, with utilities in colorManipulator I can easily lighten/darken a color defined in palette. With CSS variables, now it's difficult and I have to augment the palette a lot. For alpha the solution is with pure CSS function rgba, probably for lighten/darken I should go with the same way? Or, by getComputedStyle I can run the same function just as before?

Examples

-      color: darken(theme.palette.primary.main),
+      color: darken(theme.vars.palette.primary.main),

Motivation

No response

Search keywords: colorManipulator lighten darken var CSS color

@kiddliu kiddliu added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Aug 16, 2024
@aarongarciah aarongarciah added the customization: theme Centered around the theming features label Aug 16, 2024
@oliviertassinari
Copy link
Member

Almost the same as #43180 no?

@oliviertassinari oliviertassinari added the package: system Specific to @mui/system label Aug 18, 2024
@kiddliu
Copy link
Author

kiddliu commented Aug 19, 2024

You save my day @oliviertassinari ...any plan when to update the colorManipulator implementation?

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 19, 2024

I'm working on my own design system implementation with MUI v6 (base + system).

@kiddliu Do you mean that you are using Base UI + MUI System and skipping Material UI?

@kiddliu
Copy link
Author

kiddliu commented Aug 20, 2024

Yes...I did start with Material UI and later because of several design differences it seems that building the library with headless Base UI is a better solution. Now most of the components are still of Material, and some unique ones are created with Base UI and System

@siriwatknp siriwatknp added new feature New feature or request and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customization: theme Centered around the theming features new feature New feature or request package: system Specific to @mui/system
Projects
None yet
Development

No branches or pull requests

4 participants