-
1 Attachment(s)
To 16-Colors?
Hello, a friend of mine has this ASM project to do and he needs to pass a bitmap to pure DB declarations.
So I wrote this project (It is not neat, I know.. But I am in a hurry) that scans pixel per pixel a picture that it is given... My question is... How can I know which is the color it is using as in ASM's colors?
This is the list of colors I have:
[list=1][*]color 0 'black[*]color 1 'dark blue[*]color 2 'dark green[*]color 3 'light blue[*]color 4 'red[*]color 5 'purple[*]color 6 'brown[*]color 7 'white/grey[*]color 8 'dark grey[*]color 9 'light dark blue[*]color 10 'light green[*]color 11 'light light blue[*]color 12 'light red/orange[*]color 13 'pink[*]color 14 'yellow[*]color 15 'white [/list=1]
Could anyone help me? I just need to know that... Currently I am just displaying the number GetPixel is giving me...
Everything I am doing is in the module "obtenerImagenASM" in the procedure "obtenerColorASM"
I really appreciate your help!
-
Code:
select case thispixel
case 0
pixcolor = "Black"
case 1
. . .
case End
a simple select case will return whatever color is associated with the number. I think that vbBlack = 0, but the others aren't quite the same.
-
Thanks for your reply. I was just wondering if there was an easier way to do it rather than writing a select case...
I was hoping to be able to at least translate it to 256 colors...
Isn't there another way to convert it than using the "brute force"?
-
How do you expect to make 256 colors out of 16? Do you mean that you want the RGB value for the 16 colors? There is a color table online, if that's what you need.
-
Ok, let me explain myself...
First I wanted just 16 colors (Because I just knew the first 16 colors of the list)
But now that I have seen how the pictures decay in the change I would like to use more than those 16 colors I have.
I would really appreciate if you sent me that list.
Thanks you, once again.
-
Here is one of the better ones:
click
Just google "color chart" to find others