View Full Version: [S] Color Dropdown

RPG-Directory > Solved Support Topics > [S] Color Dropdown



Title: [S] Color Dropdown


Misty - November 19, 2007 12:23 AM (GMT)
Okay, now I've seen ways to add colors to the drop down menu, but does anyone know if there is a way to add a custom color with a custom name? i.e. Let's say color #506771 shows up on the list, only under the name "My Color," as a lame example.

If anyone knows of a way, or can point me in the right direction, your help is much appreciated. If there isn't a way, then thanks for replying to tell me. XD

Ričle - November 19, 2007 02:51 AM (GMT)
QUOTE
<script type='text/javascript'>
<!--
// add colors to dropdown at post page
// created by ticlo, http://ifsz.net/
n = 0
addColors = new Array()

// add colors here
addColors[n++] = 'teal'

if (document.forms['REPLIER'] && document.forms['REPLIER'].fcolor) {
e = document.REPLIER.fcolor.options
for (n = 0; n < addColors.length; n++) {
no = e[e.length] = new Option(addColors[n], addColors[n])
no.style.color = addColors[n]
}}
// -->
</script>


1) Go to the admin CP --> Board Wrappers

2) Cut and paste the javascript above into your FOOTER

3) modify the bold part in the code above (addColors[n++] = 'teal'). Change 'teal' to whatever color you want to add. You can add more than one color, and they can be RGB hex colors but if you do this the color is going to be named "00CCFF" in your dropdown menu. Here's a list of all the colors you can use that aren't hex:

AliceBlue
Antiquewhite
Aqua
Aquamarine
Azure
Beige
Bisque
Black
Blanchedalmond
Blue
Blueviolet
Brown
Burlywood
Cadetblue
Chartreuse
Chocolate
Coral
Cornflowerblue
Cornsilk
Crimson
Cyan
Darkblue
Darkcyan
Darkgoldenrod
Darkgray
Darkgreen
Darkkhaki
Darkmagenta
Darkolivegreen
Darkorange
Darkorchid
Darkred
Darksalmon
Darkseagreen
Darkslateblue
Darkslategray
Darkturquoise
Darkviolet
deeppink
Deepskyblue
Dimgray
Dodgerblue
Firebrick
Floralwhit
Forestgreen
Cyan
Gainsboro
Ghostwhite
Goldn
Goldenrod
Gray
Green
Greenyellow
Honeydew
Hotpink
Indianred
Indigo
Ivory
Khaki
Lavender
Lavenderblush
Lawngreen
Lemonchiffon
Lightblue
Lightcoral
Lightcyan
Lightgoldenrodyellow
Lightgreen
Lightgrey
Lightpink
Lightsalmon
Lightseagreen
Lightskyblue
Lightslategray
Lightsteelblue
Lightyellow
Lime
Limegreen
Linen
Magenta
Maroon
Mediumaquamarine
Mediumblue
Mediumorchid
Mediumpurple
Mediumseagreen
Mediumslateblue
Mediumspringgreen
Mediumturquoise
Mediumvioletred
Midnightblue
Mintcream
Mistyrose
Moccasin
Navajowhite
Navy
Oldlace
Olive
Olivedrab
Orange
Orangered
Orchid
Palegoldenrod
Palegreen
Paleturquoise
Palevioletred
Papayawhip
Peachpuff
Peru
Pink
Plum
Powderblue
Purple
Red
Rosybrown
Royalblue
Saddlebrown
Salmon
Sandybrown
Seagreen
Seashell
Sienna
Silver
Skyblue
Slateblue
Slategray
Snow
Springgreen
Steelblue
Tan
Teal
Thistle
Tomato
Turquoise
Violet
Wheat
White
Whitesmoke
Yellow
YellowGreen

4) Let me know if it doesn't work :)

5) If none of those colors is the one you want (or similar enough that you're happy), I'm not sure if you can custom name hex ones. I've browsed some topics in the code index but I don't see how to customize the hex name with javascript. Unfortunately a base knowledge of javascript would probably be necessary to do this.

What you can do is go here: http://forum.ifcode.com/index.php? and create an account. Browse the "literally huge invisionfree code index" for code that does what you want, and try to splice it in to the code for the dropdown menu. You can also ask the staff to modify this code for you so that it does what you want, but I've noticed that they tend to ignore most of the code requests. If one of those colors I listed is close to what you want that would be the easiest way to go.

...Good luck! Hope that was helpful... I know coding stuff is hard.

Misty - November 19, 2007 09:31 PM (GMT)
Yeah, that's the code I've seen before for adding colors. I have it stashed away safely if I can't find a way to do what I want to do so at least I have something to work with. I'm just really hoping that somewhere there is a custom naming style to this that can be tracked down (I can almost swear I've heard of one existing, but it could have been something else) because I'd like some colors to show up on the list but not in their "hex" form...and I know those colors don't closely represent any of the named colors...I have this habit of picking "out-of-the-mainstream" shades of colors to use for things. :p

No luck for me so far, but dial up and searching forums for codes don't go so well together. I can get about one thread every minute or two, and with literally hundreds to look through at various sites, it isn't going so well. (ouch)

Unfortunately, I don't actually know Javascript stuff...probably would help alot, eh? It's something I want to learn sometime, but don't have the time to sit and learn about it right now like I'd like to. Though, it'd be just my luck that I go to learn it and start getting bits confused with other coding. XD

Thanks for the response, though! I haven't been to that site you mentioned yet, so I'll have to check it out when I get a little more time to try to go browsing places. All I've searched so far are parts of the IF Skin Zone (and I'm not nearly through their stuff, even).

ShinLi - January 11, 2008 10:44 PM (GMT)
Your topic has been solved and moved to the 'Solved Support Topics' forum! Still have a question, or something isn't clear yet? PM an admin, gmod or cmod, and it will be moved back to the Support Center.




Hosted for free by InvisionFree