Page 1 of 1

WINDOW BACKCOLOR

Posted: Mon Mar 09, 2009 12:33 pm
by CCH4CLIPPER
Hi All

From hmg_help.chc
[ BACKCOLOR <anBackColor> ]

What are the valid values of anBackColor ?

Say, I wan the color TEAL, what would be the value ?


CCH
http://cch4clipper.blogspot.com

Re: WINDOW BACKCOLOR

Posted: Mon Mar 09, 2009 1:01 pm
by esgici
CCH4CLIPPER wrote:Hi All

From hmg_help.chc
[ BACKCOLOR <anBackColor> ]

What are the valid values of anBackColor ?

Say, I wan the color TEAL, what would be the value ?


CCH
http://cch4clipper.blogspot.com
Hi CCH

<anBackColor> is a array with three numeric values in range 0-255 ( RGB Color values )

You may use some predefined color constants ( please see C:\hmg\INCLUDE\i_color.ch ) and of course you may define your own color constant same way. f.e.

Code: Select all

#define ALICEBLUE  { 240, 248, 255 }
#define ANTICWHITE { 250, 265, 215 }
#define AQUA       {   0, 128,   0 }
#define AZURE      { 240, 255, 255 }  
#define BEIGE      { 245, 245, 220 }
#define BISQUE     { 255, 228, 196 }
#define BLANCH     { 255, 235, 205 }
#define BLUEVIOLET { 138,  43, 226 }
#define BURLYWOOD  { 222, 184,  87 } 
#define BROWN_2    { 165,  42,  42 }
#define CADETBLUE  {  95, 158, 160 }
#define CORNBLEU   { 100, 149, 237 } 
#define CORNSILK   { 255, 248, 220 } 
#define CYAN       {   0, 255, 255 }
#define CYANBUNE   { 190, 210, 230 }
#define DARKBLUE   {   0,   0, 139 }
#define DARKCYAN   {   0, 139, 139 }
#define DARKKHAKI  { 189, 183, 107 } 
#define DARKGRAY   { 169, 169, 169 }
#define DARKGREEN  {   0, 100,   0 }
#define DARKRED    { 139,   0,   0 }
#define GREEN_2    {   0, 128,   0 }
#define KHAKI      { 240, 230, 140 }
#define LIME       {   0, 255,   0 }  // GREEN 
#define MAROON     { 128,   0,   0 }
#define NAVY       {   0,   0, 128 }
#define OLIVE      { 128, 128,   0 }
#define ORANGE     { 255, 165,   0 }
#define SILVER     { 192, 192, 192 }
#define TEAL       {   0, 128, 128 }
#define TURQUOISE  {  64, 224, 208 }
You may found RGB Color values and its combinations anywhere in the Internet.

As an example, you may get information / utilize by attached sample. ( It's available also at http://vivaclipper.googlepages.com/ColorCodes.zip )


Regards

--

esgici

Re: WINDOW BACKCOLOR

Posted: Mon Mar 09, 2009 1:36 pm
by CCH4CLIPPER
Hi Escigi

I added #include "i_color.ch" which include
#define FUCHSIA { 255 , 0 , 255 }

and use BACKCOLOR FUSCHIA

When I use HMGIDE to compile and link, I get Base/1003, Variable does not exist FUSCHIA

What am I doing wrong ?


CCH
http://cch4clipper.blogspot.com

Re: WINDOW BACKCOLOR

Posted: Mon Mar 09, 2009 2:59 pm
by esgici
CCH4CLIPPER wrote: I added #include "i_color.ch" which include
#define FUCHSIA { 255 , 0 , 255 }

and use BACKCOLOR FUSCHIA

When I use HMGIDE to compile and link, I get Base/1003, Variable does not exist FUSCHIA

What am I doing wrong ?


CCH
Hi CCH

Defined as : FUCHSIA ...

used as : ... FUSCHIA

BTW, you don't have add #include "i_color.ch"; it's standard HMG .ch file, always added by default. So you can use color codes defined it, without #include.

You may build a separate .ch file such as "myColrCons.ch" with desired color constants (such as TEAL and anything else) and add #include "myColrCons.ch" in your prgs.

Regards

--

esgici

Re: WINDOW BACKCOLOR

Posted: Tue Mar 10, 2009 12:40 am
by CCH4CLIPPER
Hi Escigi

Thanx !

CCH
http://cch4clipper.blogspot.com

Re: WINDOW BACKCOLOR

Posted: Wed Jan 30, 2019 11:26 am
by mustafa
Hola amigos:
Experimentando para encontrar una herramienta para transferir
los Códigos de colores para la aplicación que estemos creando
mediante Copiar y Pegar.
Encontré este magnífico Sample sobre colores creado por el amigo
Bicahi Esgici, me he permitido modificar un poco su Código Fuente
para que permita Copiar y Pegar los Codes de los Colores

Esta modificación esta inspirada sobre el trabajo del Sample
del Maestro Grigory Filatov "ColorsTable.zip"
http://www.hmgforum.com/viewtopic.php?f ... WinVersion
Espero que les sirva para vuestros trabajos
Saludos
Mustafa
*----------------------------- Google :mrgreen: -----------------------------------*
Hello friends:
Experimenting to find a tool to transfer
the color codes for the application that we are creating
by Copy and Paste.
I found this magnificent Sample about colors created by the friend
Bicahi Esgici, I have allowed myself to modify your Source Code a bit
to allow Copy and Paste the Codes of Colors

This modification is inspired by the work of the Sample
of Master Grigory Filatov "ColorsTable.zip"
http://www.hmgforum.com/viewtopic.php?f ... WinVersion
I hope it serves you for your work
Regards
Mustafa

Re: WINDOW BACKCOLOR

Posted: Wed Jan 30, 2019 11:22 pm
by mol
It's fine, but try to implement wheel of colours (I don't know if this is good translated :) )

Re: WINDOW BACKCOLOR

Posted: Thu Jan 31, 2019 6:06 pm
by mustafa
Hola Mol:
Solo he conseguido que se pueda Copiar y Pegar los Códigos de Colores para nuestras aplicaciones,
a lo mejor el Amigo Esgici puede ayudarle, que es el autor del Sample.
Saludos
*----------------------------------------------------------------- Google -----------------------------------------------------------*
Hello Mol:
I have only managed to copy and paste the Color Codes for our applications,maybe the Friend Esgici
can help you, who is the author of the Sample.
Regards
Mustafa