@pathscale/ui 1.1.15 → 1.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -107,8 +107,7 @@ const hueDistance = (a, b)=>{
|
|
|
107
107
|
const isNearColor = (color, item)=>{
|
|
108
108
|
const hueDelta = hueDistance(color.hsl.h, item.hue);
|
|
109
109
|
const saturationDelta = Math.abs(color.hsl.s - item.saturation);
|
|
110
|
-
|
|
111
|
-
return hueDelta <= 2 && saturationDelta <= 2 && lightnessDelta <= 2;
|
|
110
|
+
return hueDelta <= 5 && saturationDelta <= 15;
|
|
112
111
|
};
|
|
113
112
|
const LAYOUT = [
|
|
114
113
|
{
|
|
@@ -419,7 +418,7 @@ const ColorWheelFlower = (props)=>{
|
|
|
419
418
|
const hueDelta = hueDistance(current.hsl.h, item.hue);
|
|
420
419
|
const saturationDelta = Math.abs(current.hsl.s - item.saturation);
|
|
421
420
|
const lightnessDelta = Math.abs(current.hsl.l - item.lightness);
|
|
422
|
-
const score =
|
|
421
|
+
const score = 2.0 * hueDelta + +saturationDelta + 0.1 * lightnessDelta;
|
|
423
422
|
if (score < bestScore) {
|
|
424
423
|
bestScore = score;
|
|
425
424
|
closest = index;
|
|
@@ -67,8 +67,8 @@ function hslHueToOklchHue(hslHue) {
|
|
|
67
67
|
const PRIMARY_SETTINGS = {
|
|
68
68
|
light: {
|
|
69
69
|
"--color-primary": {
|
|
70
|
-
l:
|
|
71
|
-
c: 0.
|
|
70
|
+
l: 58,
|
|
71
|
+
c: 0.22
|
|
72
72
|
},
|
|
73
73
|
"--color-primary-content": {
|
|
74
74
|
l: 98,
|
|
@@ -77,12 +77,12 @@ const PRIMARY_SETTINGS = {
|
|
|
77
77
|
},
|
|
78
78
|
dark: {
|
|
79
79
|
"--color-primary": {
|
|
80
|
-
l:
|
|
81
|
-
c: 0.
|
|
80
|
+
l: 75,
|
|
81
|
+
c: 0.18
|
|
82
82
|
},
|
|
83
83
|
"--color-primary-content": {
|
|
84
|
-
l:
|
|
85
|
-
c: 0.
|
|
84
|
+
l: 15,
|
|
85
|
+
c: 0.02
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
};
|
|
@@ -101,8 +101,8 @@ const HARMONY_SETTINGS = {
|
|
|
101
101
|
c: 0.026
|
|
102
102
|
},
|
|
103
103
|
"--color-accent": {
|
|
104
|
-
l:
|
|
105
|
-
c: 0.
|
|
104
|
+
l: 62,
|
|
105
|
+
c: 0.14
|
|
106
106
|
},
|
|
107
107
|
"--color-accent-content": {
|
|
108
108
|
l: 98,
|
|
@@ -111,19 +111,19 @@ const HARMONY_SETTINGS = {
|
|
|
111
111
|
},
|
|
112
112
|
dark: {
|
|
113
113
|
"--color-secondary": {
|
|
114
|
-
l:
|
|
115
|
-
c: 0.
|
|
114
|
+
l: 72,
|
|
115
|
+
c: 0.16
|
|
116
116
|
},
|
|
117
117
|
"--color-secondary-content": {
|
|
118
|
-
l:
|
|
118
|
+
l: 15,
|
|
119
119
|
c: 0.013
|
|
120
120
|
},
|
|
121
121
|
"--color-accent": {
|
|
122
|
-
l:
|
|
123
|
-
c: 0.
|
|
122
|
+
l: 78,
|
|
123
|
+
c: 0.12
|
|
124
124
|
},
|
|
125
125
|
"--color-accent-content": {
|
|
126
|
-
l:
|
|
126
|
+
l: 15,
|
|
127
127
|
c: 0.014
|
|
128
128
|
}
|
|
129
129
|
}
|
|
@@ -208,16 +208,16 @@ const SEMANTIC_SETTINGS = {
|
|
|
208
208
|
const NF_ACCENT_SETTINGS = {
|
|
209
209
|
light: {
|
|
210
210
|
"--nf-accent": {
|
|
211
|
-
l:
|
|
212
|
-
c: 0.
|
|
211
|
+
l: 58,
|
|
212
|
+
c: 0.22
|
|
213
213
|
},
|
|
214
214
|
"--nf-on-accent": {
|
|
215
215
|
l: 98,
|
|
216
216
|
c: 0.02
|
|
217
217
|
},
|
|
218
218
|
"--color-nf-accent": {
|
|
219
|
-
l:
|
|
220
|
-
c: 0.
|
|
219
|
+
l: 58,
|
|
220
|
+
c: 0.22
|
|
221
221
|
},
|
|
222
222
|
"--color-nf-on-accent": {
|
|
223
223
|
l: 98,
|
|
@@ -226,20 +226,20 @@ const NF_ACCENT_SETTINGS = {
|
|
|
226
226
|
},
|
|
227
227
|
dark: {
|
|
228
228
|
"--nf-accent": {
|
|
229
|
-
l:
|
|
230
|
-
c: 0.
|
|
229
|
+
l: 75,
|
|
230
|
+
c: 0.18
|
|
231
231
|
},
|
|
232
232
|
"--nf-on-accent": {
|
|
233
|
-
l:
|
|
234
|
-
c: 0.
|
|
233
|
+
l: 15,
|
|
234
|
+
c: 0.02
|
|
235
235
|
},
|
|
236
236
|
"--color-nf-accent": {
|
|
237
|
-
l:
|
|
238
|
-
c: 0.
|
|
237
|
+
l: 75,
|
|
238
|
+
c: 0.18
|
|
239
239
|
},
|
|
240
240
|
"--color-nf-on-accent": {
|
|
241
|
-
l:
|
|
242
|
-
c: 0.
|
|
241
|
+
l: 15,
|
|
242
|
+
c: 0.02
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
245
|
};
|