mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2006
Posts: 60
S
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.

Joined: Oct 2005
Posts: 1,741
G
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

Joined: Aug 2006
Posts: 60
S
Babel fish
OP Offline
Babel fish
S
Joined: Aug 2006
Posts: 60
Convert this manually?!

Joined: Oct 2005
Posts: 1,741
G
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

Joined: Aug 2006
Posts: 60
S
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.

Joined: Oct 2005
Posts: 1,741
G
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


Link Copied to Clipboard