Redash
  • Redash
  • Animations
  • Coordinates
  • Math
  • Strings
  • Transitions
  • Vectors
  • Paths
  • Physics
  • Colors
Powered by GitBook
On this page
  • mixColor()
  • colorForBackground()

Was this helpful?

Colors

Color interpolations and more

mixColor()

Identical to interpolateColor() but with an animation value that goes from 0 to 1.

const backgroundColor = useDerivedValue(() =>  
  mixColor(progress.value, "#ff3884", "#38ffb3")
);

colorForBackground()

Returns black or white depending on the value of the background color.

PreviousPhysics

Last updated 4 years ago

Was this helpful?