Skip to content

Commit 80a0512

Browse files
committed
add image test to drop alpha when rgb used with alpha
1 parent ccf70fb commit 80a0512

File tree

4 files changed

+242
-0
lines changed

4 files changed

+242
-0
lines changed
Loading
Loading
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
{
2+
"data": [
3+
{
4+
"name": "rgb(r,g,b,a)",
5+
"type": "scattergl",
6+
"x": [
7+
1,
8+
2,
9+
3,
10+
4
11+
],
12+
"y": [
13+
1,
14+
1,
15+
1,
16+
1
17+
],
18+
"mode": "marker+line",
19+
"marker": {
20+
"size": 20,
21+
"color": [
22+
"rgb(0, 0, 0, 0.5)",
23+
"rgb(255, 0, 0, 0.5)",
24+
"rgb(0, 255, 0, 0.5)",
25+
"rgb(0, 0, 255, 0.5)"
26+
],
27+
"line": {
28+
"width": 10,
29+
"color": [
30+
"rgb(191, 191, 191, 0.5)",
31+
"rgb(0, 255, 255, 0.5)",
32+
"rgb(255, 0, 255, 0.5)",
33+
"rgb(255, 255, 0, 0.5)"
34+
]
35+
}
36+
},
37+
"line": {
38+
"width": 20
39+
}
40+
},
41+
{
42+
"name": "rgb(r,g,b,a)+opacity",
43+
"type": "scattergl",
44+
"x": [
45+
1,
46+
2,
47+
3,
48+
4
49+
],
50+
"y": [
51+
0.5,
52+
0.5,
53+
0.5,
54+
0.5
55+
],
56+
"opacity": 0.5,
57+
"mode": "marker+line",
58+
"marker": {
59+
"size": 20,
60+
"color": [
61+
"rgb(0, 0, 0, 0.5)",
62+
"rgb(255, 0, 0, 0.5)",
63+
"rgb(0, 255, 0, 0.5)",
64+
"rgb(0, 0, 255, 0.5)"
65+
],
66+
"line": {
67+
"width": 10,
68+
"color": [
69+
"rgb(191, 191, 191, 0.5)",
70+
"rgb(0, 255, 255, 0.5)",
71+
"rgb(255, 0, 255, 0.5)",
72+
"rgb(255, 255, 0, 0.5)"
73+
]
74+
}
75+
},
76+
"line": {
77+
"width": 20
78+
}
79+
},
80+
{
81+
"name": "rgba(r,g,b,a)",
82+
"type": "scattergl",
83+
"x": [
84+
1,
85+
2,
86+
3,
87+
4
88+
],
89+
"y": [
90+
0,
91+
0,
92+
0,
93+
0
94+
],
95+
"mode": "marker+line",
96+
"marker": {
97+
"size": 20,
98+
"color": [
99+
"rgba(0, 0, 0, 0.5)",
100+
"rgba(255, 0, 0, 0.5)",
101+
"rgba(0, 255, 0, 0.5)",
102+
"rgba(0, 0, 255, 0.5)"
103+
],
104+
"line": {
105+
"width": 10,
106+
"color": [
107+
"rgba(191, 191, 191, 0.5)",
108+
"rgba(0, 255, 255, 0.5)",
109+
"rgba(255, 0, 255, 0.5)",
110+
"rgba(255, 255, 0, 0.5)"
111+
]
112+
}
113+
},
114+
"line": {
115+
"width": 20
116+
}
117+
}
118+
],
119+
"layout": {
120+
"width": 600,
121+
"height": 400,
122+
"xaxis": { "nticks": 20 },
123+
"yaxis": { "nticks": 20 },
124+
"title": {
125+
"text": "Should not display alpha<br>when having rgb not rgba"
126+
}
127+
}
128+
}
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
{
2+
"data": [
3+
{
4+
"type": "scatter3d",
5+
"x": [
6+
15,
7+
25,
8+
35,
9+
15
10+
],
11+
"y": [
12+
0,
13+
0,
14+
1,
15+
2
16+
],
17+
"z": [
18+
0,
19+
2,
20+
0,
21+
1
22+
],
23+
"marker": {
24+
"size": 20,
25+
"color": [
26+
"rgb(0, 0, 0, 0.5)",
27+
"rgb(255, 0, 0, 0.5)",
28+
"rgb(0, 255, 0, 0.5)",
29+
"rgb(0, 0, 255, 0.5)"
30+
],
31+
"line": {
32+
"width": 20,
33+
"color": [
34+
"rgb(191, 191, 191, 0.5)",
35+
"rgb(0, 255, 255, 0.5)",
36+
"rgb(255, 0, 255, 0.5)",
37+
"rgb(255, 255, 0, 0.5)"
38+
]
39+
}
40+
},
41+
"line": {
42+
"width": 20,
43+
"color": [
44+
"rgb(0, 255, 255, 0.5)",
45+
"rgb(255, 0, 255, 0.5)",
46+
"rgb(255, 255, 0, 0.5)"
47+
]
48+
}
49+
},
50+
{
51+
"type": "scatter3d",
52+
"x": [
53+
-15,
54+
-25,
55+
-35,
56+
-15
57+
],
58+
"y": [
59+
0,
60+
0,
61+
1,
62+
2
63+
],
64+
"z": [
65+
0,
66+
2,
67+
0,
68+
1
69+
],
70+
"marker": {
71+
"size": 20,
72+
"color": [
73+
"rgba(0, 0, 0, 0.5)",
74+
"rgba(255, 0, 0, 0.5)",
75+
"rgba(0, 255, 0, 0.5)",
76+
"rgba(0, 0, 255, 0.5)"
77+
],
78+
"line": {
79+
"width": 20,
80+
"color": [
81+
"rgba(191, 191, 191, 0.5)",
82+
"rgba(0, 255, 255, 0.5)",
83+
"rgba(255, 0, 255, 0.5)",
84+
"rgba(255, 255, 0, 0.5)"
85+
]
86+
}
87+
},
88+
"line": {
89+
"width": 20,
90+
"color": [
91+
"rgba(0, 255, 255, 0.5)",
92+
"rgba(255, 0, 255, 0.5)",
93+
"rgba(255, 255, 0, 0.5)"
94+
]
95+
}
96+
}
97+
],
98+
"layout": {
99+
"width": 400,
100+
"height": 400,
101+
"title": {
102+
"text": "Should not display alpha<br>when having rgb not rgba"
103+
},
104+
"scene": {
105+
"camera": {
106+
"eye": {
107+
"x": 0,
108+
"y": 1,
109+
"z": 2
110+
}
111+
}
112+
}
113+
}
114+
}

0 commit comments

Comments
 (0)