123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|514|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> Color schemes by name

Wed, 30 Jun 2010, 06:34
LostUser
I'm after a library or a list of color schemes by name rather than doing Color R,G,B.

On this page:
https://blitzbasic.com/codearcs/codearcs.php?code=2686

It has some examples, but I couldn't get it to work; also I'm wanting to keep it Object Orientated rather than just a list of constants.

I am starting to write a basic Color type scheme manager so I can say Get_Color("Chocoloate") or something similar.

Thanks.
Wed, 30 Jun 2010, 07:43
Jayenkai
Constants, or a function. It's nice to think you can do it, but it's just not doable, IMO.



If it were part and parcel of the language, then fair enough, but it isn't..




if you want to return colors, you can do a large number, since Blitz can handle those at the third parameter of Color..




I suppose you could go through the hassle of making a UserLib for it, but it probably wouldn't be worth it.

-=-=-
''Load, Next List!''
Wed, 30 Jun 2010, 11:32
LostUser
That'll do. Thanks.
Wed, 30 Jun 2010, 19:23
JL235
You should add an error for values not found, i.e.

It's good practice as you'll get an error the moment you use an incorrect colour.