Results 1 to 6 of 6

Thread: To 16-Colors?

  1. #1

    Thread Starter
    Frenzied Member Tec-Nico's Avatar
    Join Date
    Jun 2002
    Location
    México
    Posts
    1,192

    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!
    Attached Files Attached Files
    We miss you, friend... Rest in Peace, we will take care of the rest of it.

    [vbcode]
    On Error Me.Fault = False
    [/vbcode]
    - Silence is the human way to share ignorance
    Tec-Nico

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901
    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.

  3. #3

    Thread Starter
    Frenzied Member Tec-Nico's Avatar
    Join Date
    Jun 2002
    Location
    México
    Posts
    1,192
    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"?
    We miss you, friend... Rest in Peace, we will take care of the rest of it.

    [vbcode]
    On Error Me.Fault = False
    [/vbcode]
    - Silence is the human way to share ignorance
    Tec-Nico

  4. #4
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901
    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.

  5. #5

    Thread Starter
    Frenzied Member Tec-Nico's Avatar
    Join Date
    Jun 2002
    Location
    México
    Posts
    1,192
    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.
    We miss you, friend... Rest in Peace, we will take care of the rest of it.

    [vbcode]
    On Error Me.Fault = False
    [/vbcode]
    - Silence is the human way to share ignorance
    Tec-Nico

  6. #6
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901
    Here is one of the better ones:

    click

    Just google "color chart" to find others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width