Skip to content

Animating to hex colors #179

Closed
Closed
@nikola

Description

@nikola

Currently when I want to animate, for instance, an element's background-color to black, I have to write code similar to this:

$(selector]).velocity({backgroundColorRed: 0, backgroundColorGreen: 0, backgroundColorBlue: 0})

I'd like to be able to use a shorthand, e.g.

$(selector]).velocity({backgroundColor: 'black'})

or even

$(selector]).velocity({backgroundColor: 'white'})

Turns out velocity.js already has code to translate color tokens into RGB tuples, but unfortunately I don't have time to patch it myself.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions