Skip to content
General IRCd

$rgb(colours)

A TG007 community discussion started by Silo.

Discussion 11 posts
Page 1 of 1
Open
Topic #11360 · 11 published posts · 2,698 views

Hi guys & dolls, could somebody please help me complete this list (or let me know if I've got some wrong).

orange return $rgb(255,140,0)
black return $rgb(0,0,0)
red return $rgb(255,0,0)
blue return $rgb(0,0,255)
white return $rgb(255,255,255)
pink return $rgb(255,0,255)
yellow return $rgb(255,255,0)
cyan return $rgb(0,255,255)
grey return $rgb(192,192,192)

 

I'm trying to get all the colours that mIRC uses in a simplified fashion. If anyone could offer their insight etc, that would be great.

 

Thanks :)

just use something like paint, and do colour selector, then you should be able to see their RGB values.

Ahhhh, gosh, sometimes the obvious just shoots right past me! lol Thanks, David :)

 

PS - Is mIRC's & MDX $RGB function a bit picky in how you manipulate it? I was just having a bit a play around with an idea and using;

(From .ini file)

Dialog_Colour=255,255,255

Dodgy, I know, I Know :P

 

and then this;

dll $mdx SetColor $dname 3,4,5 background $rgb($readini($_data,Colours,Dialog_Colour))

(Again, dodgy, I know :P)

Since I assumed I was inserting 255,255,255 within the $RGB( ) wrap, I thought it would of worked no problem at all.

 

I doubt I'll even utilise this, it was more of an experiment to try different things out. Any reason why this wouldn't work, though :)

Edited Oct 9, 2008 1:15 PM by Silo

that color cop thing here i believe gives rgb values

Thanks, KD, I've just been playing around in paint like TKG suggested, getting some more colour codes. Makes it soooooooooooooooooo hard when you're somewhat colour blind :o

you cannot just do...

var %red = 255,0,0
$rgb(%red)

the reason is that it sees %red as a string, and doesn't recognise you have the commas there for it. You actually need to do something like...

var %r = 255, %g = 0, %b = 0
$rgb(%r,%g,%b)

This will work. So what i would suggest is using the above code and just change the values to a $gettok version so that you can get it from your ini file. I would suggest using a while loop and a readini with n value, instead of the actual name (i believe you can scan like that from memory, just check the help file).

Edited Oct 9, 2008 7:50 PM by The Gate Keeper

Color Cop FTW! :stupid:

Ok, used colourcop, worked a treat. TGK, thank you as well. I got it to work, though the end result was quite sloppy. I heard a term today called spaghetti codng. I think that sums me up quite well, at this junctre in time :P

 

Thanks again, guys :)

For future reference you can also get the rgb value of mirc colors by calling $rgb($color(<mirc color code here>))

 

Blue: $rgb($color(12)) == 0,0,252

Purple: $rgb($color(6)) == 156,0,156

Edited Oct 12, 2008 12:25 AM by Warrior124

Ahhh thank you, Warrior. That is very handy to know. I Was wracking my brain trying to think of where I'd seen that, as I remembered seeing you use it somewhere some time ago.

I shall impliment this immediately since my route of calling the event was VERY sloppy (ugly).

 

Thanks again, my friends :)

Ahhh thank you, Warrior. That is very handy to know. I Was wracking my brain trying to think of where I'd seen that, as I remembered seeing you use it somewhere some time ago.

I shall impliment this immediately since my route of calling the event was VERY sloppy (ugly).

 

Thanks again, my friends :)

 

No problem. :)