1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-13 00:42:49 -05:00

matugen: tweak kcolorscheme

This commit is contained in:
bbedward
2025-11-08 14:49:31 -05:00
parent cc0984db14
commit fefa2bd839
3 changed files with 51 additions and 31 deletions

View File

@@ -543,6 +543,10 @@ DankModal {
const r = Math.round(root.currentColor.r * 255)
const g = Math.round(root.currentColor.g * 255)
const b = Math.round(root.currentColor.b * 255)
if (root.alpha < 1) {
const a = Math.round(root.alpha * 255)
return `${r}, ${g}, ${b}, ${a}`
}
return `${r}, ${g}, ${b}`
}
font.pixelSize: Theme.fontSizeMedium
@@ -560,7 +564,13 @@ DankModal {
const r = Math.round(root.currentColor.r * 255)
const g = Math.round(root.currentColor.g * 255)
const b = Math.round(root.currentColor.b * 255)
const rgbString = `rgb(${r}, ${g}, ${b})`
let rgbString
if (root.alpha < 1) {
const a = Math.round(root.alpha * 255)
rgbString = `rgba(${r}, ${g}, ${b}, ${a})`
} else {
rgbString = `rgb(${r}, ${g}, ${b})`
}
Quickshell.execDetached(["sh", "-c", `echo "${rgbString}" | wl-copy`])
ToastService.showInfo(`${rgbString} copied`)
}
@@ -597,6 +607,10 @@ DankModal {
const h = Math.round(root.hue * 360)
const s = Math.round(root.saturation * 100)
const v = Math.round(root.value * 100)
if (root.alpha < 1) {
const a = Math.round(root.alpha * 100)
return `${h}°, ${s}%, ${v}%, ${a}%`
}
return `${h}°, ${s}%, ${v}%`
}
font.pixelSize: Theme.fontSizeMedium
@@ -614,7 +628,13 @@ DankModal {
const h = Math.round(root.hue * 360)
const s = Math.round(root.saturation * 100)
const v = Math.round(root.value * 100)
const hsvString = `${h}, ${s}, ${v}`
let hsvString
if (root.alpha < 1) {
const a = Math.round(root.alpha * 100)
hsvString = `${h}, ${s}, ${v}, ${a}`
} else {
hsvString = `${h}, ${s}, ${v}`
}
Quickshell.execDetached(["sh", "-c", `echo "${hsvString}" | wl-copy`])
ToastService.showInfo(`HSV ${hsvString} copied`)
}