forum-msg-id-134968-edit

Original date:2020-06-02 01:28:31 Edited by: petelomax Subject: Re: How do you define a custom color [LINUX}

Well actually, you can do anything:

If you are talking about a console, then text_color()/bk_color() are limited to the 16 predefined ones but (as per phix\builtins\VM\pfileioN.e/set_console_colour() - which could fairly easily be ported to Euphoria) you can always wrap kernel32/SetConsoleTextAttribute on windows or printf(1"\E[%d;%dm", {bold,color}) on Linux. You would probably gain very little though, if indeed anything.

If you are talking about a gui lib, each will have it's own mechanism, eg pGUI supports #AARRGGBB formats and has an atom color = rgb(atom red, green, blue, alpha=0) routine, in other words that is 16 million colours ranging from completely opaque to completely transparent.

As said though, some/most of the ancient DOS palette and bitmap handling stuff is either dead in the water or pretty close to it, and quite rightly so.

Pete

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu