Jump to content

$rgb(colours)


Silo

Recommended Posts

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 :)

Link to comment
Share on other sites

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 by Silo
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by The Gate Keeper
Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...