Skip to content

interpolateColor stopped handling transparent colors - 2.3.0-alpha.2 #2328

Closed
@DanielMarkiel

Description

Description

In v2.3.0-alpha.2 interpolateColor method stopped correctly handling transparent colors e.g transparent, rgba(0,0,0,0) or #00000000 which are recognized correctly in v2.2.0.

Expected behavior

interpolateColor method should correctly handle the color values listed above.

Actual behavior & steps to reproduce

Try to use one of the mentioned colors as a value for the interpolateColor method. It looks like the color is being omitted and the next one on the list is rendered.
Side note: If I try to set e.g. rgba(128,0,0,0)' the color is handled correctly.

Snack or minimal code example

interpolateColor(
  sharedValue.value,
  [0,1],
  ['rgba(0,0,0,0)', '#FF0000']
)

Package versions

  • React Native: 0.65.1
  • React Native Reanimated: 2.3.0-alpha.2
  • NodeJS: 14 LTS
  • Xcode: 12.5
  • Java & Gradle: 6.9

Affected platforms

  • Android
  • iOS
  • Web (I haven't checked)

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions