Skip to content

Commit 14bd0f6

Browse files
committed
Increase test data precision
1 parent 6605643 commit 14bd0f6

File tree

6 files changed

+105
-64
lines changed

6 files changed

+105
-64
lines changed

lib/sass/value/color.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,8 @@ def _analogous_channel_missing?(original, output, output_channel_index)
569569

570570
return false if original.equal?(output)
571571

572-
output_channel = output.space.channels[output_channel_index]
573-
original_channel = original.space.channels.find do |channel|
572+
output_channel = output._space.channels[output_channel_index]
573+
original_channel = original._space.channels.find do |channel|
574574
output_channel.analogous?(channel)
575575
end
576576

spec/sass/value/color/interpolation_examples.rb

Lines changed: 46 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{
88
weight: 0.5
99
},
10-
[58.614201646094955, 10.016665992350433, -8.387820174394456]
10+
[58.614201693004674, 10.016667522478151, -8.387819651868517]
1111
],
1212
[
1313
{
@@ -19,35 +19,39 @@
1919
{
2020
weight: 0
2121
},
22-
[38.95792456574883, -15.169549415088852, -17.792484605053115]
22+
[38.957924659568256, -15.169546354833418, -17.792483560001216]
2323
]
2424
],
2525
oklab: [
2626
[
2727
{
2828
weight: 0.5
2929
},
30-
[0.6476500020040917, 0.02748550994678843, -0.023408287379941606]
30+
[0.6476500060804854, 0.027485511076670896, -0.023408311310399166]
31+
3132
],
3233
[
3334
{
3435
weight: 1
3536
},
36-
[0.8241000000000002, 0.10608808442731632, 0.0015900762693974446]
37+
[0.8241000051752044, 0.10608808769190603, 0.0015900461037656743]
38+
3739
],
3840
[
3941
{
4042
weight: 0
4143
},
42-
[0.47120000400818335, -0.05111706453373946, -0.048406651029280656]
44+
[0.47120000698576636, -0.05111706553856424, -0.048406668724564006]
45+
4346
]
4447
],
4548
lch: [
4649
[
4750
{
4851
weight: 0.5
4952
},
50-
[58.61420164622054, 29.299459370089924, 295.6021177856686]
53+
[58.614201693004674, 29.299457976259603, 295.6021198088788]
54+
5155
],
5256
[
5357
{
@@ -59,83 +63,95 @@
5963
{
6064
weight: 0
6165
},
62-
[38.957924566, 23.38135449889311, 229.5496923459574]
66+
[38.957924659568256, 23.381351711232465, 229.54969639237788]
67+
6368
],
6469
[
6570
{
6671
weight: 0.5,
6772
method: 'shorter'
6873
},
69-
[58.61420164622054, 29.299459370089924, 295.6021177856686]
74+
[58.614201693004674, 29.299457976259603, 295.6021198088788]
75+
7076
],
7177
[
7278
{
7379
weight: 0.5,
7480
method: 'longer'
7581
},
76-
[58.61420164622054, 29.299459370089924, 115.60211778566858]
82+
[58.614201693004674, 29.299457976259603, 115.6021198088788]
83+
7784
],
7885
[
7986
{
8087
weight: 0.5,
8188
method: 'increasing'
8289
},
83-
[58.61420164622054, 29.299459370089924, 115.60211778566858]
90+
[58.614201693004674, 29.299457976259603, 115.6021198088788]
91+
8492
],
8593
[
8694
{
8795
weight: 0.5,
8896
method: 'decreasing'
8997
},
90-
[58.61420164622054, 29.299459370089924, 295.6021177856686]
98+
[58.614201693004674, 29.299457976259603, 295.6021198088788]
99+
91100
]
92101
],
93102
oklch: [
94103
[
95104
{
96105
weight: 0.5
97106
},
98-
[0.6476500020040917, 0.08824999343187809, 292.1493505923757]
107+
[0.6476500060804854, 0.0882500012863419, 292.1493473823782]
108+
99109
],
100110
[
101111
{
102112
weight: 1
103113
},
104-
[0.8241, 0.1061, 0.8586999999999989]
114+
[0.8241000051752044, 0.1061000028121472, 0.8586836854624949]
115+
105116
],
106117
[
107118
{
108119
weight: 0
109120
},
110-
[0.47120000400818335, 0.07039998686375618, 223.4400011847514]
121+
[0.47120000698576636, 0.07039999976053661, 223.44001107929404]
122+
111123
],
112124
[
113125
{
114126
weight: 0.5,
115127
method: 'shorter'
116128
},
117-
[0.6476500020040917, 0.08824999343187809, 292.1493505923757]
129+
[0.6476500060804854, 0.0882500012863419, 292.1493473823782]
130+
118131
],
119132
[
120133
{
121134
weight: 0.5,
122135
method: 'longer'
123136
},
124-
[0.6476500020040917, 0.08824999343187809, 112.1493505923757]
137+
[0.6476500060804854, 0.0882500012863419, 112.14934738237824]
138+
125139
],
126140
[
127141
{
128142
weight: 0.5,
129143
method: 'increasing'
130144
},
131-
[0.6476500020040917, 0.08824999343187809, 112.1493505923757]
145+
[0.6476500060804854, 0.0882500012863419, 112.14934738237824]
146+
132147
],
133148
[
134149
{
135150
weight: 0.5,
136151
method: 'decreasing'
137152
},
138-
[0.6476500020040917, 0.08824999343187809, 292.1493505923757]
153+
[0.6476500060804854, 0.0882500012863419, 292.1493473823782]
154+
139155
]
140156
],
141157
srgb: [
@@ -223,7 +239,8 @@
223239
{
224240
weight: 0.5
225241
},
226-
[0.5427623847027483, 0.4757813439417372, 0.5419635636962455]
242+
[0.5427628071521571, 0.4757810859208764, 0.5419635611723659]
243+
227244
],
228245
[
229246
{
@@ -235,7 +252,8 @@
235252
{
236253
weight: 0
237254
},
238-
[0.2431790331963506, 0.3045087255847488, 0.38356879501347535]
255+
[0.24317987809516806, 0.304508209543027, 0.3835687899657161]
256+
239257
]
240258
],
241259
rec2020: [
@@ -283,7 +301,8 @@
283301
{
284302
weight: 0.5
285303
},
286-
[0.3740759617070767, 0.3215358224064546, 0.2908164562135577]
304+
[0.37407596368010154, 0.32153582267804004, 0.29081645447205257]
305+
287306
],
288307
[
289308
{
@@ -295,15 +314,17 @@
295314
{
296315
weight: 0
297316
},
298-
[0.08408207011375313, 0.10634498228480066, 0.14703708775508573]
317+
[0.08408207405980274, 0.10634498282797152, 0.14703708427207543]
318+
299319
]
300320
],
301321
rgb: [
302322
[
303323
{
304324
weight: 0.5
305325
},
306-
[146.56944672156501, 134.1448156837381, 157.00580432872178]
326+
[146.49494601036622, 133.9494959758061, 156.77020571682615]
327+
307328
],
308329
[
309330
{
@@ -315,7 +336,8 @@
315336
{
316337
weight: 0
317338
},
318-
[38.14436413378462, 100.00369046118837, 120.62648929056449]
339+
[37.99536271138702, 99.61305104532435, 120.15529206677323]
340+
319341
]
320342
],
321343
hsl: [

spec/sass/value/color/spaces.rb

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
name: 'lab',
1010
is_legacy: false,
1111
is_polar: false,
12-
pink: [78.27047872644108, 35.20288139978972, 1.0168442562642044],
13-
blue: [38.95792456574883, -15.169549415088856, -17.792484605053115],
12+
pink: [78.27047872644108, 35.20288139978972, 1.0168442562641822],
13+
blue: [38.957924659568256, -15.169546354833418, -17.792483560001216],
1414
channels: %w[lightness a b],
1515
ranges: [
1616
[0, 100],
@@ -30,8 +30,8 @@
3030
name: 'oklab',
3131
is_legacy: false,
3232
is_polar: false,
33-
pink: [0.8241000000000002, 0.10608808442731632, 0.0015900762693974446],
34-
blue: [0.47120000400818335, -0.05111706453373946, -0.048406651029280656],
33+
pink: [0.8241000051752044, 0.10608808769190603, 0.0015900461037656743],
34+
blue: [0.47120000698576636, -0.05111706553856424, -0.048406668724564006],
3535
channels: %w[lightness a b],
3636
ranges: [
3737
[0, 1],
@@ -51,8 +51,8 @@
5151
name: 'lch',
5252
is_legacy: false,
5353
is_polar: true,
54-
pink: [78.27047872644108, 35.21756424128674, 1.6545432253797676],
55-
blue: [38.957924566, 23.38135449889311, 229.54969234595737],
54+
pink: [78.27047872644108, 35.21756424128674, 1.6545432253797117],
55+
blue: [38.957924659568256, 23.381351711232465, 229.54969639237788],
5656
channels: %w[lightness chroma hue],
5757
has_powerless: true,
5858
ranges: [
@@ -73,8 +73,8 @@
7373
name: 'oklch',
7474
is_legacy: false,
7575
is_polar: true,
76-
pink: [0.8241, 0.1061, 0.8587],
77-
blue: [0.47120000400818335, 0.07039998686375618, 223.44000118475142],
76+
pink: [0.8241000051752044, 0.1061000028121472, 0.8586836854624949],
77+
blue: [0.47120000698576636, 0.07039999976053661, 223.44001107929404],
7878
channels: %w[lightness chroma hue],
7979
has_powerless: true,
8080
ranges: [
@@ -95,7 +95,7 @@
9595
name: 'srgb',
9696
is_legacy: false,
9797
is_polar: false,
98-
pink: [0.9999785463111585, 0.6599448662991679, 0.758373017125016],
98+
pink: [0.9999785463111587, 0.6599448662991679, 0.7583730171250161],
9999
blue: [0.14900142239759614, 0.39063941586401707, 0.47119722379126755],
100100
channels: %w[red green blue],
101101
ranges: [
@@ -113,8 +113,9 @@
113113
name: 'srgb-linear',
114114
is_legacy: false,
115115
is_polar: false,
116-
pink: [0.999951196094508, 0.3930503811476254, 0.5356603778005655],
116+
pink: [0.9999511960945082, 0.39305038114762536, 0.5356603778005656],
117117
blue: [0.019378214827482948, 0.12640222770203852, 0.18834349393523495],
118+
118119
channels: %w[red green blue],
119120
ranges: [
120121
[0, 1],
@@ -149,7 +150,7 @@
149150
name: 'a98-rgb',
150151
is_legacy: false,
151152
is_polar: false,
152-
pink: [0.9172837001828321, 0.6540226622083835, 0.7491144397116841],
153+
pink: [0.9172837001828322, 0.6540226622083833, 0.749114439711684],
153154
blue: [0.2557909283504703, 0.3904466064332277, 0.4651826475952292],
154155
channels: %w[red green blue],
155156
ranges: [
@@ -167,8 +168,8 @@
167168
name: 'prophoto-rgb',
168169
is_legacy: false,
169170
is_polar: false,
170-
pink: [0.842345736209146, 0.6470539622987257, 0.7003583323790157],
171-
blue: [0.24317903319635056, 0.3045087255847488, 0.38356879501347535],
171+
pink: [0.842345736209146, 0.6470539622987259, 0.7003583323790157],
172+
blue: [0.24317987809516806, 0.304508209543027, 0.3835687899657161],
172173
channels: %w[red green blue],
173174
ranges: [
174175
[0, 1],
@@ -185,8 +186,8 @@
185186
name: 'rec2020',
186187
is_legacy: false,
187188
is_polar: false,
188-
pink: [0.8837118321235519, 0.6578067923850563, 0.7273197917658354],
189-
blue: [0.2151122740532409, 0.32363973150195124, 0.4090033869684574],
189+
pink: [0.883711832123552, 0.6578067923850561, 0.7273197917658352],
190+
blue: [0.21511227405324085, 0.3236397315019512, 0.4090033869684574],
190191
channels: %w[red green blue],
191192
ranges: [
192193
[0, 1],
@@ -224,8 +225,8 @@
224225
name: 'xyz-d50',
225226
is_legacy: false,
226227
is_polar: false,
227-
pink: [0.6640698533004002, 0.5367266625281085, 0.4345958246720296],
228-
blue: [0.08408207011375313, 0.10634498228480066, 0.1470370877550857],
228+
pink: [0.6640698533004004, 0.5367266625281086, 0.43459582467202973],
229+
blue: [0.08408207405980274, 0.10634498282797152, 0.14703708427207543],
229230
channels: %w[x y z],
230231
ranges: [
231232
[0, 1],
@@ -266,8 +267,8 @@
266267
name: 'rgb',
267268
is_legacy: true,
268269
is_polar: false,
269-
pink: [254.9945293093454, 168.28594090628783, 193.38511936687908],
270-
blue: [38.144364133784602, 100.003690461188378, 120.626489290564506],
270+
pink: [254.99452930934547, 168.28594090628783, 193.3851193668791],
271+
blue: [37.99536271138702, 99.61305104532435, 120.15529206677323],
271272
channels: %w[red green blue],
272273
ranges: [
273274
[0, 255],
@@ -287,7 +288,7 @@
287288
name: 'hsl',
288289
is_legacy: true,
289290
is_polar: true,
290-
pink: [342.63204677447646, 99.98738302509669, 82.99617063051632],
291+
pink: [342.63204677447646, 99.98738302509679, 82.99617063051633],
291292
blue: [195.0016494775154, 51.95041997811069, 31.009932309443183],
292293
channels: %w[hue saturation lightness],
293294
has_powerless: true,
@@ -302,7 +303,7 @@
302303
[0.5, 110, 50],
303304
{
304305
clip: [0.5, 100, 50],
305-
'local-minde': [2.9140262667138472, 100, 52.05146874647547]
306+
'local-minde': [2.9140266584158057, 100, 52.05146824961835]
306307
}
307308
]
308309
]
@@ -312,7 +313,7 @@
312313
name: 'hwb',
313314
is_legacy: true,
314315
is_polar: true,
315-
pink: [342.63204677447646, 65.99448662991679, 0.002145368884157506],
316+
pink: [342.63204677447646, 65.9944866299168, 0.002145368884129084],
316317
blue: [195.0016494775154, 14.900142239759612, 52.880277620873244],
317318
channels: %w[hue whiteness blackness],
318319
has_powerless: true,
@@ -327,7 +328,8 @@
327328
[0.5, -3, -7],
328329
{
329330
clip: [0.5, 0, 0],
330-
'local-minde': [3.492121744609392, 11.26651892207301, 0]
331+
'local-minde': [3.492122559065345, 11.266517197307957, 0]
332+
331333
}
332334
]
333335
]

0 commit comments

Comments
 (0)