Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ MUSHclient
➜ Suggestions
➜ Allow custom colours in colour picker
Allow custom colours in colour picker
|
Posting of new messages is disabled at present.
Refresh page
Pages: 1
2
Posted by
| Shadowfyr
USA (1,788 posts) Bio
|
Date
| Reply #15 on Sun 08 Apr 2007 09:41 PM (UTC) |
Message
| Two possibilities would be in the world, or in global. And it should effect everything, except maybe MXP. But you have a valid point about plugins. Its not like we parse the script looking to things like the colournote command and see if the color is one that is in the list. We could look for ones in triggers and add XML for them, warn if they are missing, but script use of them.. becomes a problem, since the only realistic way to do it would be to check the code to see "if" all colors used are valid and export the non-standard ones either as an addon to the script code or as XML, so they auto-import when loaded some place else. Neither of those is likely to happen. :( The only other option is to do what we have done in 1-2 cases and, "leave it to the plugin developer to make sure X is done right." Just as the plugin developer needs to make sure they "export" all triggers needed for the plugin and copy all script related to its operation into the final result, they would have to make sure to export the correct "colors" to the plugin for it to work right.
I really hadn't thought about that issue. | Top |
|
Posted by
| Nick Gammon
Australia (23,122 posts) Bio
Forum Administrator |
Date
| Reply #16 on Sun 08 Apr 2007 09:45 PM (UTC) Amended on Sun 08 Apr 2007 09:46 PM (UTC) by Nick Gammon
|
Message
| You haven't said how the colours get imported in the first place, nor where they get saved. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Shadowfyr
USA (1,788 posts) Bio
|
Date
| Reply #17 on Sun 08 Apr 2007 10:14 PM (UTC) |
Message
| Ok. Imported - through a function for assigning a name to a color, or as an option in the color dialog where you put in a name and click, "save this color". As for other import/export issues, same as with exporting triggers, timers, etc. from a world file, or importing them. And, like those, some people might want to include a "global" set for all worlds. Not that I see a lot of people doing that now with the current global options. | Top |
|
Posted by
| Shaun Biggs
USA (644 posts) Bio
|
Date
| Reply #18 on Sun 08 Apr 2007 10:28 PM (UTC) |
Message
| Although I'd be quite happy about being able to import a custom colour list, I see one main problem aside from trying to figure out where they are stored. What happens if I call a colour that does not exist in my list? Let's say, for example, I have loaded one of Shadowfyr's scripts which has ColourNote( "cornsilk", "black", "Plugin loaded" ) and I don't have "cornsilk" in my custom colours? Does it just go to the default script colours like it does now?
Actually, after a bit of testing, I notice that you can't even call the custom colours by name in ColourNote. It just fails out to the default colour for whichever part you have wrong.
Quote: 1. Assign it to a variable.
2. Assign it to an entity.
3. Just use the colors hex code.
#3 works in all four contexts, but is ambiguous.
I don't see how the hex code is ambiguous. It leaves the least amount of room for error, since it is directly declaring the colour, rather than relying on anything that can be affected by the end user. |
It is much easier to fight for one's ideals than to live up to them. | Top |
|
Posted by
| Shadowfyr
USA (1,788 posts) Bio
|
Date
| Reply #19 on Sun 08 Apr 2007 10:35 PM (UTC) |
Message
| Its ambiguous from the standpoint of someone trying to remember what the color looks like. Like I said, I don't know about you, but I don't generally go into paint stores and tell them, "I want a can of &h55FE23." In some places, even knowing the convention "they" use for defining colors by code will get you blank stares too. I have no idea what that color looks like, except in the most vague sense. If it had a name, I could visualize the color based on the name I gave it. | Top |
|
Posted by
| Shaun Biggs
USA (644 posts) Bio
|
Date
| Reply #20 on Sun 08 Apr 2007 11:08 PM (UTC) Amended on Sun 08 Apr 2007 11:12 PM (UTC) by Shaun Biggs
|
Message
| I used to work in a paint store... names don't help often. Dutch Boy had a colour called "Outer Space" which was a dark greyish brown instead of black like everyone expected.
As for the colour #55FE23, it's obviously a green of some sort. Probably bright since it has some red in it, which brings it closer to yellow. Aside from that, I would love to have a way to paste a colour directly into the colour picker. Instead, I have to slide the bars back and forth. I tried double checking.
Going through the colour picker list, it's not always obvious what a colour is from the name either. I'd expect "papayawhip" to be more orange. And I have no clue what a "burlywood" is. "Darkgray" is also lighter than "gray" for some odd reason, and "dimgray" is darker than both of them. |
It is much easier to fight for one's ideals than to live up to them. | Top |
|
Posted by
| Nick Gammon
Australia (23,122 posts) Bio
Forum Administrator |
Date
| Reply #21 on Sun 08 Apr 2007 11:30 PM (UTC) |
Message
|
Quote:
I notice that you can't even call the custom colours by name in ColourNote.
Yes you can, how are you going about it?
ColourNote ("brown", "blue", "testing")
Quote:
I would love to have a way to paste a colour directly into the colour picker.
As I said before, if you have a colour name or code on the clipboard, the "paste" button becomes active. Clicking that pastes that colour into the picker, and it becomes the current colour. These work:
brown
#A52A2A
&h2A2AA5
0x2A2AA5
2763429
All are variations on the way "brown" can be represented, and if (alone) on the clipboard, all will cause the Paste button to activate, and allow the direct pasting of the colour in. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,122 posts) Bio
Forum Administrator |
Date
| Reply #22 on Sun 08 Apr 2007 11:45 PM (UTC) |
Message
| Or do you mean the custom colours, as in the 16 colours in the custom colour dialog?
Those are world-specific, so the same argument applies to those, if you started adding them to the MXP colour name space.
Also, there is nothing stopping you giving them the same names (eg. colour1, colour1, colour1).
You know you can copy the colour codes from any active colour swatch (eg. in the custom colour dialog) by right-clicking on it and selecting Copy. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,122 posts) Bio
Forum Administrator |
Date
| Reply #23 on Mon 09 Apr 2007 12:04 AM (UTC) Amended on Mon 09 Apr 2007 12:05 AM (UTC) by Nick Gammon
|
Message
| If you wanted to use one of the 16 custom colours in the custom colour world configuration, in a colournote, you could do it like this:
ColourNote (RGBColourToName (GetCustomColourText (3)),
RGBColourToName (GetCustomColourBackground (3)),
"testing 1 2 3") -- display in custom colour 3
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Shaun Biggs
USA (644 posts) Bio
|
Date
| Reply #24 on Mon 09 Apr 2007 12:52 AM (UTC) |
Message
| I first tried with ColourNote( "Custom1". "Custom2", "blah" ) and it didn't work, obviously. As I said, I couldn't call them by name.
Sorry about the pasting bit. I had the numbers without the pound sign in front. That doesn't activate paste.
|
It is much easier to fight for one's ideals than to live up to them. | Top |
|
Posted by
| Nick Gammon
Australia (23,122 posts) Bio
Forum Administrator |
Date
| Reply #25 on Mon 09 Apr 2007 01:14 AM (UTC) |
Message
| "Use the source, Luke!".
The function GetClipboardColour handles doing that inside MUSHclient. It checks for:
- A match on the MXP colour-table lookup.
- The first 2 bytes being "&H" or "0X"
- The first 1 byte being "#"
- Whether it is a straight decimal number
For the cases of &Hxxx, 0Xxxx and #xxx it then checks for at least one hex digit following, and then does the hex to decimal conversion. After that the colour has to be in the range 0 to 0xFFFFFF. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,122 posts) Bio
Forum Administrator |
Date
| Reply #26 on Mon 09 Apr 2007 01:58 AM (UTC) |
Message
| There didn't seem to be an easy way of finding the custom colour names, short of parsing the world file, so I have added a couple of new functions to version 4.03, which lets you get and set the custom names. These are GetCustomColourName and SetCustomColourName. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
70,043 views.
This is page 2, subject is 2 pages long:
1
2
Posting of new messages is disabled at present.
Refresh page
top