By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,945 Members | 1,342 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,945 IT Pros & Developers. It's quick & easy.

What is nn#RRGGBB format?

P: n/a
Hi,

The color is represented by #RRGGBB format. On a javascript sample,
it uses nn#RRGGBB format. What does nn mean? Here is the sample
codes:

(1)

var button = new ItemStyle(22, 1, '>', -15, 2, '10#006633',
'10#CC6600', 'buttonText', 'buttonHover',
'buttonBorder', 'buttonBorderOver', 80, 95, 'crosshair', 'default');

(2)

// For the colour fading, pull properties out of the nn#RRGGBB format
colours.
aI.timer = aI.count = 0;
aI.fade=[];
for(var i=0;i<2;i++)
{
// Set oC to the name of the property to check, either 'outCol' or
'overCol'.
var oC = i ? 'overCol' : 'outCol';
// The ItemStyle 'nn#RRGGBB' fading speed format: use a regex to
match it.
if (aI[oC].match(/^(\d+)\#(..)(..)(..)$/))
{
// Reset the outCol and overCol values to normal for the
div-writing routines.
aI[oC] = '#' + r.$2 + r.$3 + r.$4;
// Then store a subarray of fade speed and 3 hex colour calues if
detected.
aI.fade[i] = [r.$1, r.$2, r.$3, r.$4];
}
}
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"chirs" <ym*@kicon.com> schreef in bericht
news:4c**************************@posting.google.c om...
Hi,

The color is represented by #RRGGBB format. On a javascript sample,
it uses nn#RRGGBB format. What does nn mean? Here is the sample
codes:


In the snippet, nn is matched with a regular expression to set the speed of
the fade effect achieved by the script.

In other words: it is specific for this script.
JW

Jul 20 '05 #2

P: n/a
ym*@kicon.com (chirs) writes:
The color is represented by #RRGGBB format. On a javascript sample,
it uses nn#RRGGBB format. What does nn mean? Here is the sample
codes:
Read the comments:
// The ItemStyle 'nn#RRGGBB' fading speed format: use a regex to
match it.


It is used internally in the script. The nn appears to be the fading
speed.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.