What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [huh?] ColorRef

[huh?] ColorRef
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [huh?] ColorRef
A COLORREF is just a name for a DWORD value which is a concatenation of the three RGB values of a color. When you view the value in hexadecimal it is very easy to see how it is made:

0x00BBGGRR

Where BB is te blue component (a value from 0 to 255 (decimal))
Where GG is te green component (a value from 0 to 255 (decimal))
Where RR is te red component (a value from 0 to 255 (decimal))

So you can very easly make this value yourself if you know the RGB values. Just binary left shift the individual components:

var Red = 11
var Green = 22
var Blue = 33

with pure arethmetics:
var ColorRef = Blue * 256 * 256 + Green * 256 + Red
or the equivalent:
var ColorRef = (Blue << 16) + (Green << 8) + Red

in VBScript/VB you can also use the RGB() function:
ColorRef = RGB(Red, Green, Blue)

---

A COLORREF value is also used in the Plus! registry settings for some values:
http://www.msgpluslive.net/help/registry/

---

Blah, need to refresh more often again

This post was edited on 08-23-2008 at 02:19 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
08-23-2008 02:08 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[huh?] ColorRef - by SmokingCookie on 08-23-2008 at 10:26 AM
RE: [huh?] ColorRef - by Volv on 08-23-2008 at 01:36 PM
RE: [huh?] ColorRef - by Matti on 08-23-2008 at 01:48 PM
RE: [huh?] ColorRef - by CookieRevised on 08-23-2008 at 02:08 PM
RE: [huh?] ColorRef - by SmokingCookie on 08-23-2008 at 02:34 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On