mirror of
https://github.com/anapnoe/stable-diffusion-webui-ux.git
synced 2026-09-19 09:15:20 +02:00
Update ui_theme.js
This commit is contained in:
@@ -28,21 +28,21 @@ function rgbToHsl(rgb) {
|
||||
const diff = max - min;
|
||||
const add = max + min;
|
||||
|
||||
const hue = min === max ?
|
||||
0 :
|
||||
const hue = min === max ?
|
||||
0 :
|
||||
r === max ?
|
||||
(60 * (g - b) / diff + 360) % 360 :
|
||||
g === max ?
|
||||
60 * (b - r) / diff + 120 :
|
||||
(60 * (g - b) / diff + 360) % 360 :
|
||||
g === max ?
|
||||
60 * (b - r) / diff + 120 :
|
||||
60 * (r - g) / diff + 240;
|
||||
|
||||
const lum = 0.5 * add;
|
||||
const sat = lum === 0 ?
|
||||
0 :
|
||||
lum === 1 ?
|
||||
1 :
|
||||
lum <= 0.5 ?
|
||||
diff / add :
|
||||
const sat = lum === 0 ?
|
||||
0 :
|
||||
lum === 1 ?
|
||||
1 :
|
||||
lum <= 0.5 ?
|
||||
diff / add :
|
||||
diff / (2 - add);
|
||||
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user