weaselforce
2006-04-09 00:58:54
how exactly does scar convert colors to numbers, are the colors built into scar somesort?
2006-04-09 00:58:54
2006-04-09 01:18:43
2006-04-09 02:27:05
From: weaselforce
how exactly does scar convert colors to numbers, are the colors built into scar somesort?
2006-04-09 04:24:02
From: phantombmx
i always thought it converted it by hex (somewhat) just a different way.. similar in concept tho
dont take my word that thats the way it works :D
2006-04-09 05:37:53
From: Pwnd
Yeah, it's a different way than hex, since all of the numbers aren't 6 consecutive numbers, and none of them have any sort of letter in them.
2006-04-09 06:15:50
2006-04-09 10:20:37
2006-04-09 10:50:41
B:= (RGBColor and $ff0000) shr 16;
G:= (RGBColor and $00ff00) shr 8;
R:= (RGBColor and $0000ff) shr 0; now some of that can be taken out (like the shr 0) but that can convert a color into its R, G, B values. To put them back:RGBColor:= ((B shl 16) or (G shl 8) or(R shl 0)); now in that the shl 0 can be taken out but i left it in so you could understand ;)2006-04-09 11:24:25
From: BenLand100
Bit Shifts and logic ;) Pretend the var RGBColor is a scar color and R, G, B are the different color chanels (0-255):now some of that can be taken out (like the shr 0) but that can convert a color into its R, G, B values. To put them back:B:= (RGBColor and $ff0000) shr 16;
G:= (RGBColor and $00ff00) shr 8;
R:= (RGBColor and $0000ff) shr 0;now in that the shl 0 can be taken out but i left it in so you could understand ;)RGBColor:= ((B shl 16) or (G shl 8) or(R shl 0));
BTW: it is hex ;)
$ffffff = 16777215 = white;
$ff0000 = 16711680 = blue;
$00ff00 = 65280 = green;
$0000ff = 255 = red;
$000000 = 0 = black;
2006-04-09 18:08:47
From: BenLand100
Bit Shifts and logic ;) Pretend the var RGBColor is a scar color and R, G, B are the different color chanels (0-255):now some of that can be taken out (like the shr 0) but that can convert a color into its R, G, B values. To put them back:B:= (RGBColor and $ff0000) shr 16;
G:= (RGBColor and $00ff00) shr 8;
R:= (RGBColor and $0000ff) shr 0;now in that the shl 0 can be taken out but i left it in so you could understand ;)RGBColor:= ((B shl 16) or (G shl 8) or(R shl 0));
BTW: it is hex ;)
$ffffff = 16777215 = white;
$ff0000 = 16711680 = blue;
$00ff00 = 65280 = green;
$0000ff = 255 = red;
$000000 = 0 = black;
2006-04-09 18:54:58
2006-04-09 20:28:11
2006-04-09 20:35:56
2006-04-09 21:23:49
From: WhiteShadow
Gar, Benland where'd you learn all this?
2006-04-09 22:35:19
From: BenLand100
You might think i'm lying but… I teach myself everything ;)
2006-04-10 01:04:18
2006-04-10 01:14:33
2006-04-13 17:51:58
2007-11-09 17:20:16
2007-11-09 21:24:48
From: stan boy
is there anything on the market that is handheld and converts colors to numbers. similar to Home Depot analyzing fabric to give you a paint color. In photoshop or whatever, you will notice al colors are broken into combinations of RGB, with numbers assigned to each one and combined, they give you one color. What would it take to get a device that would do this–convert the color of a surface into these numbers? My wall would be the color 45/22/114. any ideas?
2007-11-11 11:04:27
2007-11-11 13:37:57
SRL Developer/SRL Master/Moderator
2007-11-11 13:40:14
2007-11-11 13:45:16
2007-11-11 14:08:24
2007-11-11 20:30:51
2007-11-17 03:22:33
2007-11-18 08:15:36
2007-11-19 00:03:43
From: Nontitle
I would find it hard working with 3 bytes, though.
2007-11-21 10:23:54
From: BenLand100
Also, its not my fault I know how to pack data into 32 bit numbers :p
10 Gigabit Ethernet
24-bit image
32-bit operating system
32-bitine opsüsteem //32 - bit operating system
32-bit processor
3-D graphics
686
8.3 filename