Commit 03f314e
authored
Allow negative rgb and rgba values and clamp them to range 0-255 (#1129)
When converting rgb and rgba strings to colors, browsers tolerate numbers out of the acceptable color range but BabylonNative does not.
This change updates the color string regex to accept negative numbers and clamps them to the acceptable color range of 0 to 255.1 parent 235552a commit 03f314e
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
| 223 | + | |
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| |||
0 commit comments