rive_color_modifier 1.0.1 copy "rive_color_modifier: ^1.0.1" to clipboard
rive_color_modifier: ^1.0.1 copied to clipboard

retracted

An easy and straightforward way to modify the Color of specific Components within Rive Animations at runtime, while also maintaining their opacity throughout the animation.

Rive Color Modifier #

This package provides an easy and straightforward way to modify the Color of specific Components within Rive Animations at runtime, while also maintaining their opacity (alpha values) throughout the animation.

Preview #

Getting started #

To start using this package, add it as a dependency in your pubspec.yaml file:

dependencies:
  rive_color_modifier: ^1.0.0
copied to clipboard

Usage #

This package allows you to dynamically modify the Color properties of specific components in your Rive Animations. Below is an example demonstrating how to use RiveColorModifier along with RiveColorComponent to change the color of particular Shapes within an animation.

You just have to provide the Artboard of the Rive asset you are using to the RiveColorModifier, and in the components property, you pass a RiveColorComponent for each Shape you want to change the color of. You also pass the name of the Fill or Stroke and then the Color you want it to have. Super simple!

RiveColorModifier(
  artboard: _eyeArtboard,
  components: [
    RiveColorComponent(
      shapeName: 'Eye Pupil Off',
      fillName: 'Pupil Fill',
      color: colors.primary,
    ),
    RiveColorComponent(
      shapeName: 'Eye Border Off',
      strokeName: 'Eye Border Stroke',
      color: colors.primary,
    ),
  ],
)
copied to clipboard

Additional information #

For more information on how to use this package, or if you want to contribute, please visit the GitHub repository. If you encounter any issues or have feature requests, please file them in the issue tracker.

Don't forget to like the package if you find it useful, and if you have any suggestion, please let me know.

Your feedback and contributions are welcome to help improve this package!

13
likes
0
points
484
downloads

Publisher

verified publisherjsimon.dev

Weekly Downloads

2024.09.24 - 2025.04.08

An easy and straightforward way to modify the Color of specific Components within Rive Animations at runtime, while also maintaining their opacity throughout the animation.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, rive

More

Packages that depend on rive_color_modifier