WINDOW BACKCOLOR

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
CCH4CLIPPER
Posts: 130
Joined: Tue Mar 03, 2009 8:59 am
Been thanked: 1 time

WINDOW BACKCOLOR

Post by CCH4CLIPPER » Mon Mar 09, 2009 12:33 pm

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

User avatar
esgici
Posts: 4486
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 358 times
Been thanked: 109 times
Contact:

Post by esgici » Mon Mar 09, 2009 1:01 pm

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
Attachments
ColorCodes.zip
HMP Sample for select color codes
(2.49 KiB) Downloaded 266 times
Last edited by esgici on Fri Nov 04, 2011 5:17 pm, edited 1 time in total.
Viva INTERNATIONAL HMG :D

CCH4CLIPPER
Posts: 130
Joined: Tue Mar 03, 2009 8:59 am
Been thanked: 1 time

Post by CCH4CLIPPER » Mon Mar 09, 2009 1:36 pm

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

User avatar
esgici
Posts: 4486
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 358 times
Been thanked: 109 times
Contact:

Post by esgici » Mon Mar 09, 2009 2:59 pm

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
Viva INTERNATIONAL HMG :D

CCH4CLIPPER
Posts: 130
Joined: Tue Mar 03, 2009 8:59 am
Been thanked: 1 time

Post by CCH4CLIPPER » Tue Mar 10, 2009 12:40 am

Hi Escigi

Thanx !

CCH
http://cch4clipper.blogspot.com

User avatar
mustafa
Posts: 764
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Been thanked: 102 times
Contact:

Post by mustafa » Wed Jan 30, 2019 11:26 am

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
Attachments
ColorCodes_New.zip
(42.19 KiB) Downloaded 28 times
Screenshot.jpg
Screenshot.jpg (49.67 KiB) Viewed 248 times

User avatar
mol
Posts: 3128
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 191 times
Been thanked: 105 times
Contact:

Post by mol » Wed Jan 30, 2019 11:22 pm

It's fine, but try to implement wheel of colours (I don't know if this is good translated :) )

User avatar
mustafa
Posts: 764
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Been thanked: 102 times
Contact:

Post by mustafa » Thu Jan 31, 2019 6:06 pm

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

Post Reply