[AD] [ alleg-Feature Requests-2300978 ] Standard builtin colors

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Feature Requests item #2300978, was opened at 2008-11-16 14:29
Message generated for change (Comment added) made by trentg
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355665&aid=2300978&group_id=5665

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Trent Gamblin (trentg)
Assigned to: Nobody/Anonymous (nobody)
Summary: Standard builtin colors

Initial Comment:
Now that we have platform independant colors it would be nice to have some predefined colors that one could use like "white, black, red, blue" etc. It would be better if there was a way to do it without polluting the global namespace too much.

----------------------------------------------------------------------

>Comment By: Trent Gamblin (trentg)
Date: 2008-12-22 07:23

Message:
Looking over the color table again, it seems it already has all the basic
colors I want (0-7 cga)  but maybe with different names? So I guess just
keeping it without a separate table for cga would be fine.

----------------------------------------------------------------------

Comment By: Elias Pschernig (elias)
Date: 2008-12-22 06:27

Message:
About the CGA palette, I had a look here:

http://en.wikipedia.org/wiki/Color_Graphics_Adapter

I wouldn't mind adding them to the big color names list, but maybe it
would be better to keep them separate? Something like:

ALLEGRO_COLOR al_color_cga(int index)

And you pass from 0 to 15? If you actually want CGA colors, you likely
know them by numbers, not by names? Or maybe I don't understand what the
use would be.


----------------------------------------------------------------------

Comment By: Elias Pschernig (elias)
Date: 2008-12-22 06:23

Message:
Version 3 of the patch, now will build with cmake. Also fixed YUV values
going out of range in the example.

----------------------------------------------------------------------

Comment By: Elias Pschernig (elias)
Date: 2008-12-20 12:28

Message:
Uploaded an updated patch. Now there's additional convenience functions to
directly return ALLEGRO_COLOR, and CMYK and YUV conversions are working and
added to the example. Also fixed a color name which somehow got overwritten
in my original regexp magic to import from Wikipedia.

----------------------------------------------------------------------

Comment By: Trent Gamblin (trentg)
Date: 2008-12-19 10:08

Message:
Also if it's not going to be an officlal addon we could put it on
allegro5.org.

----------------------------------------------------------------------

Comment By: Trent Gamblin (trentg)
Date: 2008-12-19 10:06

Message:
I wouldn't mind it as an official addon, but it doesn't really matter much
to me. I would like to add some colors though, basically just the 16 colors
in the cga palette. They could be called cga_blue, cga_lightblue, or
whatever.

----------------------------------------------------------------------

Comment By: Elias Pschernig (elias)
Date: 2008-12-19 08:21

Message:
Added a patch which adds such an addon. It comes with an example, but will
only build with scons right now.

Now the question is, do we want something like this in the official
repository? Else I can look for another place to put it and it will be the
first external addon. A small problem is that the example uses nihgui.cpp..
are addon authors supposed to use it?



----------------------------------------------------------------------

Comment By: Elias Pschernig (elias)
Date: 2008-11-16 16:09

Message:
I think that's purely addon material. However, I think a "color" addon
would be useful. It probably should have something like

ALLEGRO_COLOR al_get_color(char const *name)

and understand all of those (which includes the ones you named):
http://en.wikipedia.org/wiki/X11_color_names

And it also should have RGB<->HSV<->YUV conversion functions similar to
the ones in Allegro 4.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355665&aid=2300978&group_id=5665




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/