Results 1 to 22 of 22

Thread: RGB.scar - Work In Progress

  1. #1
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    RGB.scar - Work In Progress

    RGB.scar - A Work in Progress


    Helpful Links and Scripts Using RGB.scar:


    Updates:
    • 8/14/2007 - Project Started
    • 8/17/2007 - Project Beta Released
    • 8/17/2007 - RGB Variable better Utilized
    • 8/18/2007 - FindClosestRGB Released
    • 8/18/2007 - FindRGBTolerance Released / RGB Variabel ReVamped


    About The Project:

    Well in an effort to promote the use of RGB and to inform scripters of its great uses, I have decided to at least start on the project of bringing RGB colorfinding into the SRL include. The initial beta version only includes the creation of the RGB variable and a few RGB functions that may prove useful. I have only set out the tools, now you, the scripters can use them .

    RGB is useful for many things but the thing I personally believe it to be best for it Autocoloring and Finding tolerance faster.

    Goals -
    • Moderately Increase AutoColoring Techniques [X]
    • Increase Color Tolerance Finding Techniques [X]
    • Finding the center of Colors, such as trees [ ]
    • RGB Variable [X]

    More to come...

    What it Includes
    • RGB Variable
    • CreateRGB
    • CompareColorsRGBEx
    • CompareColorsRGB
    • CompareColorArrayRGB
    • AutoColorMM
    • MinArray
    • FindClosestRGB
    • ConvertRGB
    • FindRGBTolerance


    To find out how these procedures and functions work, please refer to the tutorial at the top.

    Things to be added:
    • Experemental Colorfinding
      This is one of my favorites. Its something I thought of while thinking of ways to speed up the colorfinding. It looks great and it will soon be released!
    • RGB Component Creator
      This is on its way also. Will be just like RadialWalk Helper, etc.
    • Much More!

    Join the fastest growing merchanting clan on the the net!

  2. #2
    Join Date
    Oct 2006
    Location
    MI USA
    Posts
    3,166
    Mentioned
    6 Post(s)
    Quoted
    11 Post(s)

    Default

    Very Interesting .....Have you considered creating a plugin to improve efficiency and increase speed ?


  3. #3
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ha. Well its not at all an attempt to get into SRL but at least it will possibly spark some interest in RGB. I use RGB quite often in scripting and it is very useful for me. I am not near finished with some of my functions that I am working on so hopefully it will be bigger. Also I'm hoping that alot of people will contribute.

    And Yes. I am currently in the process of making one.

    Join the fastest growing merchanting clan on the the net!

  4. #4
    Join Date
    Aug 2007
    Posts
    282
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i am very interested in this.. i will be reading the tutorial and coming back when you add more

  5. #5
    Join Date
    Nov 2006
    Posts
    1,103
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    im willing to make the plugin if needed
    Infractions, reputation, reflection, the dark side of scripting, they are.

  6. #6
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok cool I loveit I'll message you right away .

    Join the fastest growing merchanting clan on the the net!

  7. #7
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    You've inspired me... I'm going to try to make an HSL or CMYK (if scar supports it) include.


    When I start making it, we could work together to create some of the fuctions.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  8. #8
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah that sounds good. I have been wondering if I or someone should do HSL.scar. Anyways add me on msn ( in my sig ).

    EDIT : Updated. Now includes an extremely fast (For RGB) colorfinding with Tolerance finder.

    Join the fastest growing merchanting clan on the the net!

  9. #9
    Join Date
    Aug 2007
    Posts
    282
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wow... you just keep coming and coming.. a hit tutorial and an include all in like 2 days?!?!?!

    NICE haha.

    im liking this stuff. i am going to look at it closely later and try to learn from it.

  10. #10
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ha yeah. I haven't been here since about Febuary and I decided that I should make up for lost time .

    Join the fastest growing merchanting clan on the the net!

  11. #11
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nicve work
    ~Hermen

  12. #12
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Lol. Well, HSL is coming along nicely. Thing is, I haven't found any way to convert Color32 (IE. Color mod 256) to HSL . Poor me...


    Nice job on most of the functions, once you're more finished I would try putting it in the SRL new functions forum.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  13. #13
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by hermpie View Post
    nicve work
    Thnx

    Quote Originally Posted by r0b0t1 View Post
    Lol. Well, HSL is coming along nicely. Thing is, I haven't found any way to convert Color32 (IE. Color mod 256) to HSL . Poor me...


    Nice job on most of the functions, once you're more finished I would try putting it in the SRL new functions forum.
    K Get Ill pm you about it .

    Join the fastest growing merchanting clan on the the net!

  14. #14
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    You respond fast.

    Well, I found the stuff to convert from RGB on wikipedia... But I'll get on anyway. I forgot what part of it meant.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  15. #15
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    500th post woot. Alright

    Join the fastest growing merchanting clan on the the net!

  16. #16
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Lookey what I've got for ya if you want!

    SCAR Code:
    function FindRGBCircleTol(var RgX, RgY: Integer; R, G, B, MidX, MidY, Dist, Tol:
     Integer): Boolean;
    var
      C: Integer;
    begin
      C := RGBToColor(R, G, B);
      Result := FindColorCircleTolerance(RgX, RgY, C, MidX, MidY, Dist, Tol);
    end;

    Nothing big, but noticed you didnt have finding from circle.

  17. #17
    Join Date
    Jan 2007
    Location
    Kansas
    Posts
    3,760
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Lol n3ss3s you forgot to add in a param on the RGBtoColor for the color spot.


  18. #18
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Lol, there isnt it returns the integer. And it compiles I tested.

    Oh and pwn heres another
    SCAR Code:
    function GetClosest(RGB: string; ClosestTo, x1, y1, x2, y2, MaxAdd: Integer): Integer;
    var
      I, C1, C2, R, G, B, TempC, x, y: Integer;
    var
      TempB: Boolean;
    begin
      Result := 0;
      ColorToRGB(ClosestTo, R, G, B);
      for I := 1 to 2 do  // 1 = Up, 2 = Down
      begin
        repeat
          case RGB of
          'R': begin
           case I of
             1: begin
               TempC := RGBToColor(R, G, B);
               if(not(FindColor(x, y, TempC, x1, y1, x2, y2)))then
               begin
                 Inc(R);
               end;
             end;
             2: begin
               TempC := RGBToColor(R, G, B);
               if(not(FindColor(x, y, TempC, x1, y1, x2, y2)))then
               begin
                 Dec(R);
               end;
             end;
           end;

           'G': begin
           case I of
             1: begin
               TempC := RGBToColor(R, G, B);
               if(not(FindColor(x, y, TempC, x1, y1, x2, y2)))then
               begin
                 Inc(G);
               end;
             end;
             2: begin
               TempC := RGBToColor(R, G, B);
               if(not(FindColor(x, y, TempC, x1, y1, x2, y2)))then
               begin
                 Dec(G);
               end;
             end;
           end;

           'B': begin
           case I of
             1: begin
               TempC := RGBToColor(R, G, B);
               if(not(FindColor(x, y, TempC, x1, y1, x2, y2)))then
               begin
                 Inc(B);
               end;
             end;
             2: begin
               TempC := RGBToColor(R, G, B);
               if(not(FindColor(x, y, TempC, x1, y1, x2, y2)))then
               begin
                 Dec(B);
               end;
             end;
           end;
         end;

    Its not ready, but the meaning of it is to return the closest R, G, or B to the R, G or B of the ClosestTo TColor's RGBs

    You can create your own of it if you need or something...

  19. #19
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    SCAR Code:
    Function FindRGBTriangleTol(var RgX, RgY: Integer; R, G, B, X1, Y1, X2, Y2, X3, Y3, Tol): Boolean;
     Var Col: Integer;
     begin;
      Col:= RGBToColor(R, G, B);
      Result:= FindColorTriangleTolerance(RgX, RgY, Col,  X1, Y1, X2, Y2, X3, Y3, Tol);
     end;


    Lol. Start making the skips.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  20. #20
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yup . Anyways whenever I have time I will add these functions. School is starting and I'm not allowed to get on SRL during the week (for now). Anyways updated with a link to one of the scripts using RGB.scar. It has it included and I think it shows how well RGB can be used .

    Join the fastest growing merchanting clan on the the net!

  21. #21
    Join Date
    Jul 2007
    Location
    America
    Posts
    421
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey, this is probably going to sound like a stupid question, but what is RGB (Red Green Blue), and what is it used for?
    I dunno, those asians are pretty difficult to out-auto, legend has it they don't need sleep or food...~tim0suprem0
    Activity is on the decline - school's got me
    Check out my tutorial[s] on Color Finding!||Procedures and Functions!

  22. #22
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    It is a color space.

    Well, it's just a way of defining colors, almost like SCAR's colors (Color32). But to use it you usually must go RGBToColor().
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Getting Scar to work?
    By Shaunyowns in forum OSR Help
    Replies: 2
    Last Post: 10-24-2008, 06:19 PM
  2. Progress report from scar?
    By lil rahmer662 in forum OSR Help
    Replies: 11
    Last Post: 02-03-2008, 02:25 PM

Posting Permissions

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