Jason Sebring Jason Sebring - 1 year ago 262
Less Question

How to invert colors in LESS

Is there a particular color operation I'm not seeing where you can invert colors? I'm seeing lots of color methods but could not see a way to do this.



Answer Source

There are multiple interpretation of inverting color.

  • You want a color with the opposite hue:

    spin(@color, 180)

  • You want a color that the sum with current one is white:

    #fff - @color

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download