Skip to content

manager: provide monet color to webui#2981

Merged
aviraxp merged 5 commits into
tiann:mainfrom
KOWX712:monet_webui
Nov 26, 2025
Merged

manager: provide monet color to webui#2981
aviraxp merged 5 commits into
tiann:mainfrom
KOWX712:monet_webui

Conversation

@KOWX712

@KOWX712 KOWX712 commented Nov 23, 2025

Copy link
Copy Markdown
Collaborator

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:

@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

KOWX712 and others added 2 commits November 23, 2025 21:41
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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 MonetColorsProvider singleton to generate CSS with Monet color variables from the app's theme
  • Added internal/colors.css endpoint in SuFilePathHandler that 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.

Comment thread manager/app/src/main/java/me/weishu/kernelsu/ui/webui/MonetColorsProvider.kt Outdated
Comment thread manager/app/src/main/java/me/weishu/kernelsu/ui/webui/SuFilePathHandler.java Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread manager/app/src/main/java/me/weishu/kernelsu/ui/webui/MonetColorsProvider.kt Outdated
…orsProvider.kt

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread manager/app/src/main/java/me/weishu/kernelsu/ui/webui/MonetColorsProvider.kt Outdated
Replaces the volatile colorsCss variable with an AtomicReference for thread-safe updates and access. This improves concurrency handling in MonetColorsProvider.
@aviraxp aviraxp merged commit ea1fc66 into tiann:main Nov 26, 2025
KOWX712 added a commit to KOWX712/KernelSU that referenced this pull request Nov 26, 2025
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>
@KOWX712 KOWX712 deleted the monet_webui branch November 26, 2025 15:49
rsuntk pushed a commit to rsuntk/KernelSU that referenced this pull request Nov 27, 2025
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>
KOWX712 added a commit to KOWX712/APatch that referenced this pull request Dec 24, 2025
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>
KOWX712 added a commit to KOWX712/KsuWebUIStandalone that referenced this pull request Dec 24, 2025
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>
KOWX712 added a commit to KOWX712/KsuWebUIStandalone that referenced this pull request Dec 24, 2025
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>
KOWX712 added a commit to KOWX712/KsuWebUIStandalone that referenced this pull request Dec 24, 2025
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>
KOWX712 added a commit to KOWX712/KsuWebUIStandalone that referenced this pull request Dec 28, 2025
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>
KOWX712 added a commit to KOWX712/KsuWebUIStandalone that referenced this pull request Dec 28, 2025
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>
KOWX712 added a commit to KOWX712/KsuWebUIStandalone that referenced this pull request Dec 28, 2025
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>
u9521 added a commit to u9521/KernelSU that referenced this pull request Jan 4, 2026
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>
u9521 added a commit to u9521/KernelSU that referenced this pull request Jan 5, 2026
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>
u9521 added a commit to u9521/KernelSU that referenced this pull request Jan 8, 2026
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>
KOWX712 added a commit to KOWX712/APatch that referenced this pull request Jan 11, 2026
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>
KOWX712 added a commit to KOWX712/APatch that referenced this pull request Jan 11, 2026
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>
KOWX712 added a commit to KOWX712/APatch that referenced this pull request Jan 11, 2026
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>
u9521 added a commit to u9521/KernelSU that referenced this pull request Jan 13, 2026
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>
KOWX712 added a commit to KOWX712/KsuWebUIStandalone that referenced this pull request Feb 8, 2026
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>
KOWX712 added a commit to KOWX712/KsuWebUIStandalone that referenced this pull request Mar 11, 2026
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>
KOWX712 added a commit to KOWX712/KsuWebUIStandalone that referenced this pull request Mar 11, 2026
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>
KOWX712 added a commit to KOWX712/KsuWebUIStandalone that referenced this pull request Apr 14, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants