@@ -281,7 +281,8 @@ const selfAndBackground = async(el, parent) => {
281
281
282
282
// If background is semi-transparent, blend it with the parent background
283
283
// to get the actual solid background color
284
- if ( background . indexOf ( 'rgba' ) > - 1 && background !== 'rgba(255, 255, 255, 1)' ) {
284
+ if ( ( background . indexOf ( 'rgba' ) > - 1 && background !== 'rgba(255, 255, 255, 1)' ) ||
285
+ ( background . includes ( 'color(srgb' ) && background . includes ( '/' ) ) ) {
285
286
let parentParent = await ( par || parent ) . findElement ( By . xpath ( '..' ) ) ;
286
287
let parentBackground = await parentParent . getCssValue ( 'backgroundColor' ) ;
287
288
@@ -296,11 +297,11 @@ const selfAndBackground = async(el, parent) => {
296
297
297
298
// If element background is semi-transparent, blend it with the background
298
299
// to get the actual solid element background color
299
- if ( self . indexOf ( 'rgba' ) > - 1 && self !== 'rgba(255, 255, 255, 1)' ) {
300
+ if ( ( self . indexOf ( 'rgba' ) > - 1 && self !== 'rgba(255, 255, 255, 1)' ) ||
301
+ ( self . includes ( 'color(srgb' ) && self . includes ( '/' ) ) ) {
300
302
decomposed = getRGBFromRGBA ( decomposeColor ( self ) , decomposeColor ( background ) ) ;
301
303
self = 'rgb(' + decomposed . r + ', ' + decomposed . g + ', ' + decomposed . b + ')' ;
302
304
}
303
-
304
305
// If element background is fully transparent, use the background color
305
306
// of the parent element instead
306
307
if ( self === 'rgba(0, 0, 0, 0)' ) {
0 commit comments