Stacks API

Come build with us.
Stacks API v6 for Stacks 2.5


  <   Templates Variable Reference


Color Values

%id=colorID%

This content is open source. You can edit it and submit a pull request on GitHub.
This page is generated from this file.


© . YourHead Software all rights reserved.

Color Values

%id=colorID%

Available: Stacks API v3

Usage

%id=<colorControlID>% 
%id=<colorControlID> <operation> n%

Description

Color values output as HTML hex color strings.

Color Math operations can be used to modify the colors.

Example 1: Color math used in CSS

    /* lighten the color by 25/255ths */
    .lighterStuff {
      background-color: %id=userSelectedColor + 25%;
    }

    /* darken the color by 25/255ths */
    .darkerStuff {
      background-color: %id=userSelectedColor - 25%;
    }

    /* twice as light */
    .lightestStuff {
      background-color: %id=userSelectedColor * 2%;
    }

    /* twice as dark */
    .darkestStuff {
      background-color: %id=userSelectedColor * 0.5%;
    }
© . YourHead Software all rights reserved.