mIRC Home    About    Download    Register    News    Help

Print Thread
color codes: hexdecimal -> mIRC #205615 27/10/08 02:08 AM
Joined: Aug 2006
Posts: 60
S
Shining_Phoenix Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Aug 2006
Posts: 60
Does anyone here know how to convert hexadecimal color codes to mirc color codes? I want to convert a colored html ascii art to a colored MotD.

Re: color codes: hexdecimal -> mIRC [Re: Shining_Phoenix] #205617 27/10/08 02:39 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
The problem with this request is that mIRC has 16 colors versus 16 million hexadecimal colors. Obviously, there are several ways to automate this process, but the easiest to setup would be some sort of reference table to determine which mIRC color relates to each range of hex colors.

Bottom line, I think it would be easier to do the conversion manually.

-genius_at_work

Re: color codes: hexdecimal -> mIRC [Re: genius_at_work] #205701 28/10/08 11:26 PM
Joined: Aug 2006
Posts: 60
S
Shining_Phoenix Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Aug 2006
Posts: 60
Convert this manually?!

Re: color codes: hexdecimal -> mIRC [Re: Shining_Phoenix] #205705 29/10/08 02:16 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Are you planning to do that conversion more than once?

It would be quite simple to convert that image. I don't know how many different colors are in that image, but judging by the color scheme of that image, you will only be able to use 5-7 mIRC colors. You could just copy/paste the text from that ascii image into a text editor, and then find/replace <font color="black"> with ctrl-k+01 (for example). You would do that over and over for each hex color in the string. Unfortunately, you will lose some of the color spectrum in the image due to mIRC's limited color palette.

If you are only planning to do this once, it will take a bit of time to convert, but then you are finished. Compared to the time it would take to create a script to convert it for you, you'd have the image converted manually several times over.

-genius_at_work

Re: color codes: hexdecimal -> mIRC [Re: genius_at_work] #205718 29/10/08 08:07 PM
Joined: Aug 2006
Posts: 60
S
Shining_Phoenix Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Aug 2006
Posts: 60
Working out that "black" is 01 is straightforward enough, but working out what #somerandomhexnumber is would not be that easy. Is there anything out there that can convert #somerandomhexnumber to somecolorname? If that could be done, it would make the conversion to mIRC color codes easier.

Re: color codes: hexdecimal -> mIRC [Re: Shining_Phoenix] #205728 30/10/08 12:44 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Try this site: http://www.colorpicker.com/

Just type the hex code into the text box, and hit TAB key.

Or this site: http://www.1728.com/colrchr4.htm

-genius_at_work