Skip to content

Instantly share code, notes, and snippets.

@alexko30
Created August 14, 2018 23:16
Show Gist options
  • Save alexko30/08d3c7e8a94fe62ccde2c4699669c48d to your computer and use it in GitHub Desktop.
Save alexko30/08d3c7e8a94fe62ccde2c4699669c48d to your computer and use it in GitHub Desktop.
initialize(startValue, destValue) {
return {
data: {
format: (startValue.indexOf('rgba') >= 0 && 'rgba')
|| (startValue.indexOf('rgb') >= 0 && 'rgb')
|| (startValue.indexOf('#') >= 0 && 'hex')
|| Color(startValue).model
},
startValue: Color(startValue).rgb(),
destValue: Color(destValue).rgb()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment