Nonstop Perpetual Motion
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    colors-to-less-operationspublic

    Colors to less operations

    Transforms colors to less operations that needs to be applied to the base color to get the desired color.

    Currently colors parsed only as HEX: #fff, ccc, #ceceff.

    Usage

    c2o = require("colors-to-less-operations");
    
    base      = "#ff8000";
    dependent = "#bf8040";
    
    // will become "saturate(#ff8000, 20%); // #bf8040"
    dependentAsOperations = c2o.transformToLessOperations(base, dependent);
    

    Tests

    Run make test.

    License & copyright

    install

    npm i colors-to-less-operations

    Downloadsweekly downloads

    3

    version

    0.1.1

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar