SA-MP Forums Archive
#define color Hex help. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: #define color Hex help. (/showthread.php?tid=185299)



#define color Hex help. - M3NK5 - 24.10.2010

Hey, i'm new to scripting, and i would like to know how to make a color such as
pawn Код:
#define RED 0xFF0000FF
.

Is it the same as HTML?
EG
#EA0000
or
#CCCCCC

or is it completely different.

If you could help, thank you very much.
If your going to flame and say "use the search tool", I already have so don't waste your time typing.


Re: #define color Hex help. - Retardedwolf - 24.10.2010

Yes its the same except you change '#' to '0x'


Re: #define color Hex help. - M3NK5 - 24.10.2010

thankyou

EDIT

So, if i choose the color #C60003,

i would put
pawn Код:
#define BLOODRED 0xC60003?
Or something else.


Re: #define color Hex help. - LarzI - 24.10.2010

The "syntax" is like normal hex, but including Alpha or Transparency

so #C60003 becomes 0xC60003FF (FF for opaque color, obviously)


Re: #define color Hex help. - Retardedwolf - 24.10.2010

Quote:
Originally Posted by LarzI
Посмотреть сообщение
The "syntax" is like normal hex, but including Alpha or Transparency

so #C60003 becomes 0xC60003FF (FF for opaque color, obviously)
yeah I forgot about that.


Re: #define color Hex help. - M3NK5 - 24.10.2010

Okay sweet, thank you to both of you