ID:1037717
 
Redundant
BYOND Version:497
Operating System:Windows 8 Pro
Web Browser:Internet Explorer 10.0
Applies to:DM Language
Status: Redundant

This feature has already been implemented, or is already achievable with existing methods.
Descriptive Problem Summary:Using <font color=orange> doesn't work, other HTML colors work, the HTML color works in internet explorer & other browsers, it comes out to be #ffa500 which is what orange is when set in internet explorer, I have to use that value to get the font to be orange.

Numbered Steps to Reproduce Problem:Try & set font color to orange using HTML on world<<"Text" type calls, using maptext, or other functions which lets you set colors using html.

Code Snippet (if applicable) to Reproduce Problem:
mob
Login()
..()
world<<"<font color=orange>Test</font>


You could also encapsulate orange with \"orange\" like that, so it makes proper html with the " " s around it, but it doesn't make a difference, this seems to be the only color not to work.

Expected Results:
Even if the color is orange since it should accept html, it should accept orange as websites do in the browser.

Actual Results:It will not use the color orange in html.

Does the problem occur:
Every time? Or how often?Every Time
In other games?yes
In other user accounts?yes
On other computers?yes

When does the problem NOT occur?When not choosing the color orange, or setting color without html.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Tested lots of versions, not every single one, but happens back before BYOND 4.0

Workarounds:Not use orange, set font color without html.

Also if you use
<font color=#ffa500>Test</font>
instead of the word orange.


I don't know if it has to do with orange() proc or if it's completely unrelated or maybe the color is just not coded in as a usable color, but it hasn't worked for a very long time it seems.

---Anyways if this isn't a bug maybe it can be moved to Feature Requests, add the simple color "orange" as a usable html color.

Orange is not a valid named color in DMHTML.
See: http://www.byond.com/docs/ref/info.html#/DM/text/tags
Adding this in as a feature would be a tad bit silly considering there's thousands of other colour values we could include as well (crimson, turqoise, chartreuse, etc). However, you can define this behaviour yourself:

#define ORANGE "#ffa500"

// or...

var/const/ORANGE = "#ffa500"

mob/verb/test()
src << "<font color=\"[ORANGE]\">Is orange named after an orange or is an orange named after orange?</font>"
OK well I didn't know there was a separate HTML for DM to use... so I assume that no matter what html you use DM detects it, changes the settings to render it that way, and there you go...

If I would have known that I wouldn't have bothered posting this even since BYOND doesn't just use a control that renders the HTML directly.
LordAndrew resolved issue (Redundant)