manager: provide monet color to webui#2981
Conversation
this is a squash of: * manager: add monet colors support to webui (webui-next) (KernelSU-Next/KernelSU-Next@58aeb26) * manager:added more dynamic color vars to webui-next (KernelSU-Next/KernelSU-Next@a8bfd1c) * manager: include alpha value in webui monet color provider (f09137f) Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com>
MUIX has some different color naming from material3. Unavailable color: - surfaceContainerLow - surfaceContainerLowest - surfaceBright - surfaceDim let's just fallback with surfaceContainer for now Signed-off-by: KOWX712 <leecc0503@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR adds support for providing Monet color scheme to WebUI through CSS variables, following the MMRL monet color scheme standard. This is an opt-in feature that modules can use by importing the provided CSS file.
Key Changes:
- Created
MonetColorsProvidersingleton to generate CSS with Monet color variables from the app's theme - Added
internal/colors.cssendpoint inSuFilePathHandlerthat serves the dynamically generated CSS - Integrated CSS generation into the app theme by calling
UpdateCss()composable
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
SuFilePathHandler.java |
Added Context field and new endpoint to serve internal/colors.css when Monet color modes (3-5) are selected |
MonetColorsProvider.kt |
New singleton class that generates CSS with Monet color variables by mapping app theme colors to CSS custom properties |
Theme.kt |
Integrated UpdateCss() call into the theme composition to keep CSS synchronized with theme changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…orsProvider.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Replaces the volatile colorsCss variable with an AtomicReference for thread-safe updates and access. This improves concurrency handling in MonetColorsProvider.
Provide app color scheme using css variable in suPath, follow MMRL monet color scheme standard since some module has already support this for a while. This will not break current module's WebUI, it is an opt-in feature, you'll need to import before using it. Example: ```css @import url('https://mui.kernelsu.org/internal/colors.css'); :root { --my-background-color: var(--surface, #FEF7FF); --my-text-color: var(--onSurface, #1D1B20); } ``` This is only provided when monet color is selected in settings. Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com> --------- Signed-off-by: KOWX712 <leecc0503@gmail.com> Co-authored-by: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-authored-by: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Provide app color scheme using css variable in suPath, follow MMRL monet color scheme standard since some module has already support this for a while. This will not break current module's WebUI, it is an opt-in feature, you'll need to import before using it. Example: ```css @import url('https://mui.kernelsu.org/internal/colors.css'); :root { --my-background-color: var(--surface, #FEF7FF); --my-text-color: var(--onSurface, #1D1B20); } ``` This is only provided when monet color is selected in settings. Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com> --------- Signed-off-by: KOWX712 <leecc0503@gmail.com> Co-authored-by: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-authored-by: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: fc5b87cf <rissu.ntk@gmail.com>
sync tiann/KernelSU#2981 provide app monet color scheme to WebUI, no changes are required for existing WebUI module. Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com>
ref: tiann/KernelSU#2981 Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com>
ref: tiann/KernelSU#2981 Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com>
ref: tiann/KernelSU#2981 Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com>
ref: tiann/KernelSU#2981 Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com>
ref: tiann/KernelSU#2981 Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com>
ref: tiann/KernelSU#2981 Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com>
Provide app color scheme using css variable in suPath, follow MMRL monet color scheme standard since some module has already support this for a while. This will not break current module's WebUI, it is an opt-in feature, you'll need to import before using it. Example: ```css @import url('https://mui.kernelsu.org/internal/colors.css'); :root { --my-background-color: var(--surface, #FEF7FF); --my-text-color: var(--onSurface, #1D1B20); } ``` This is only provided when monet color is selected in settings. Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com> --------- Co-authored-by: KOWX712 <leecc0503@gmail.com> Co-authored-by: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-authored-by: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: u9521 <63995396+u9521@users.noreply.github.com>
Provide app color scheme using css variable in suPath, follow MMRL monet color scheme standard since some module has already support this for a while. This will not break current module's WebUI, it is an opt-in feature, you'll need to import before using it. Example: ```css @import url('https://mui.kernelsu.org/internal/colors.css'); :root { --my-background-color: var(--surface, #FEF7FF); --my-text-color: var(--onSurface, #1D1B20); } ``` This is only provided when monet color is selected in settings. Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com> --------- Co-authored-by: KOWX712 <leecc0503@gmail.com> Co-authored-by: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-authored-by: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: u9521 <63995396+u9521@users.noreply.github.com>
Provide app color scheme using css variable in suPath, follow MMRL monet color scheme standard since some module has already support this for a while. This will not break current module's WebUI, it is an opt-in feature, you'll need to import before using it. Example: ```css @import url('https://mui.kernelsu.org/internal/colors.css'); :root { --my-background-color: var(--surface, #FEF7FF); --my-text-color: var(--onSurface, #1D1B20); } ``` This is only provided when monet color is selected in settings. Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com> --------- Co-authored-by: KOWX712 <leecc0503@gmail.com> Co-authored-by: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-authored-by: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: u9521 <63995396+u9521@users.noreply.github.com>
sync tiann/KernelSU#2981 provide app monet color scheme to WebUI, no changes are required for existing WebUI module. Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com>
sync tiann/KernelSU#2981 provide app monet color scheme to WebUI, no changes are required for existing WebUI module. Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com>
sync tiann/KernelSU#2981 provide app monet color scheme to WebUI, no changes are required for existing WebUI module. Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com>
Provide app color scheme using css variable in suPath, follow MMRL monet color scheme standard since some module has already support this for a while. This will not break current module's WebUI, it is an opt-in feature, you'll need to import before using it. Example: ```css @import url('https://mui.kernelsu.org/internal/colors.css'); :root { --my-background-color: var(--surface, #FEF7FF); --my-text-color: var(--onSurface, #1D1B20); } ``` This is only provided when monet color is selected in settings. Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com> --------- Co-authored-by: KOWX712 <leecc0503@gmail.com> Co-authored-by: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-authored-by: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: u9521 <63995396+u9521@users.noreply.github.com>
ref: tiann/KernelSU#2981 Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com>
ref: tiann/KernelSU#2981 Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com>
ref: tiann/KernelSU#2981 Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com>
ref: tiann/KernelSU#2981 Co-Authored-By: Der_Googler <54764558+dergoogler@users.noreply.github.com> Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com> Signed-off-by: KOWX712 <leecc0503@gmail.com>
Provide app color scheme using css variable in suPath, follow MMRL monet color scheme standard since some module has already support this for a while. This will not break current module's WebUI, it is an opt-in feature, you'll need to import before using it. Example:
This is only provided when monet color is selected in settings.
Co-Authored-By: Der_Googler 54764558+dergoogler@users.noreply.github.com
Co-Authored-By: Rifat Azad 33044977+rifsxd@users.noreply.github.com
Signed-off-by: KOWX712 leecc0503@gmail.com