Results 1 to 3 of 3

Thread: Figuring out tolerance

  1. #1
    Join Date
    Feb 2012
    Posts
    170
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default Figuring out tolerance

    How do I figure out the tolerance between two colors? (I have the values for the colors, just wanna figure out the tolerance between them.)

    Thanks
    Non-RS scripter, if you need a hand with scripting let me know. I have a decent amount of experience scripting for non-RS games.

    How to add text messaging to any script: http://villavu.com/forum/showthread....98#post1151998

  2. #2
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    Use auto color aid
    Current Project: Retired

  3. #3
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    Simba Code:
    program new;

    const
      Col1 = 0;
      Col2 = 16777215;

    var
      R1, G1, B1, R2, G2, B2, Tol : Integer;

    begin
      ColorToRGB(Col1, R1, G1, B1);
      ColorToRGB(Col2, R2, G2, B2);

      R1 := iAbs(R1 - R2);
      G1 := iAbs(G1 - G2);
      B1 := iAbs(B1 - B2);

      Tol := MaxA([R1, G1, B1]);

      Writeln(Tol);
    end.

    I think

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
  •