Re: How do you define a custom color [LINUX}

new topic     » goto parent     » topic index » view thread      » older message » newer message

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, and each of those 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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu