chramos / react-native-skeleton-placeholder

SkeletonPlaceholder is a React Native library to easily create an amazing loading effect.
MIT License
682 stars 121 forks source link

Support for `rgba()` colors in `highlightColor` #88

Closed kevinhikaruevans closed 2 years ago

kevinhikaruevans commented 2 years ago

I'm currently using react-native-paper, which has colors provided by the theme. The default theme uses rgba() colors instead of hex.

When an rgba() color is used, it returns an "Unsupported color format" error:

image

This only happens with highlightColor and not backgroundColor, something like this fails:

<SkeletonPlaceholder
  backgroundColor={colors.secondary}
  highlightColor={colors.secondaryContainer}
  borderRadius={4}
>
chramos commented 2 years ago

I agree, it is important to support rgba and hex I'll check