Digits.net Web Counter
Home
Contact
Get your free Digits counter here >  

Colors of Your Counter

For more usage information, be sure to visit the Usage Page.

You can specify the colors of the counter with the background, foreground, and spacecolor options. These set the background, foreground, and empty color values respectively. The foreground color is the color of the digits and defaults to bright white (FFFFFF). The digits are displayed on the background color which defaults to black (000000). The empty color is for blank spaces that don't contain a digit. For instance, here is a lovely shade of purple:

  <a href="https://www.digits.net" target="_blank">
    <img src="https://counter.digits.net/?counter=COUNTER_DEFAULT_GUID&template=COUNTER_TEMPLATE1&background=000000&foreground=A078FF" 
     alt="Hit Counter by Digits" border="0"  width="60" height="20" />
  </a>
Purple Counter

NOTE: The name string at the end of the above HTML code should be replaced with the name of the counter that you have created.

In the above example, the -f option is followed by A078FF. This hexadecimal string sets a color. See our Color Chart for a partial list of the available colors and their respective hex values. The first 2 positions of the hex number specify the red value (A0), the next 2 the green (78), and the final 2 the blue color value (FF). Each color value goes from 00 (dark) to FF (bright). So FF0000 would be brightest red and 90FF20 would be a mid-red, brightest green, and dark blue combination. It is just like the Netscape background color format.

The empty color defaults to a light grey (BEBEBE) and is flagged as transparent in the gif that is returned. By specifying the same value for the background and the empty/transparent color, the background will be flagged as transparent as well and you can have the digits float on the page. The following example sets the foreground to be green (00B000) and the background and empty both to a white (F4F4FF) which I use as my background color.

  <a href="https://www.digits.net" target="_blank">
    <img src="https://counter.digits.net/?counter=COUNTER_DEFAULT_GUID&template=COUNTER_TEMPLATE2&background=F4F4FF&foreground=00B000" 
     alt="Hit Counter by Digits" border="0"  width="60" height="20" />
  </a>
Green Counter

NOTE: The name string at the end of the SRC section in the above HTML code should be replaced with the name of the counter that you have created.

One final important note. The foreground gets mixed into the background color so make sure your counter's background color matches your page's background color or image as closely as possible. This is important even though your counter's empty color is flagged as transparent and the background color may match.