Results 1 to 6 of 6

Thread: colors

  1. #1
    Join Date
    Feb 2008
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default colors

    how does the scar color picker work, as in how is the number converted back into RGB

  2. #2
    Join Date
    Jul 2008
    Location
    England
    Posts
    763
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ColorToRGB()...?
    lol

  3. #3
    Join Date
    Feb 2008
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    can i get the formula instead of having to figure it out myself doing the funciton multiple times

  4. #4
    Join Date
    Mar 2009
    Location
    Illinois
    Posts
    292
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Click the color picker and then click somewhere where the color is that you want...
    It should pop up like this:

    Color Picked(123, 321) = 123456789 (haven't used SCAR in a while)

    And the 123456789 is the color used like:

    if FindColor(x, y, 123456789, MSx1, MSy1, MSx2, MSy2) then

    Hope I helped

    EDIT: Oh do you mean how does the absoulte procedure work? If so its just like paint's color picker cept paint doesn't output it and just saves it so i'm not to sure

  5. #5
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    http://www.villavu.com/forum/showthread.php?t=18514 There is a section which explains RGB.


  6. #6
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Here's the answer, from the thread posted by CazaX above:

    procedure ColorToRGB(Color: Integer; var r, g, b: Integer);
    begin
    r:= (Color) and 255;
    g:= (Color shr 8) and 255;
    b:= (Color shr 16) and 255;
    end;

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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