const displayRgb = (fadeEffect, { isCurrentStep, isDisplayedInEditWindow, isSelected, hasNote, velocity, recording }) => { if (isDisplayedInEditWindow) return Colours.yellow if (isSelected) return Colours.orange if (isCurrentStep) return hasNote ? Colours.turquoise : (recording ? Colours.red : Colours.green) return hasNote ? fadeEffect(Colours.blue, velocity) : Colours.off }