Results 1 to 7 of 7

Thread: SCAR color code to hex code

  1. #1
    Join Date
    May 2007
    Location
    Seattle, WA
    Posts
    46
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default SCAR color code to hex code

    How do I translate between the SCAR color code, and the equivalent HEX code(generally used in html)? or does a connection not exist?
    Last edited by grimey; 04-28-2009 at 12:49 PM. Reason: more info

  2. #2
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default

    Code:
    var
      r, g, b: Integer;
      
    const
      HexStr = '0123456789ABCDEF';
      
    function ToHex(b: Byte): string;
    begin
      Result := HexStr[Floor(b / 16)] + HexStr[b mod 16];
    end;
      
    begin
      ColorToRGB(11439723, r, g, b);
      WriteLn('Hex = ' + ToHex(r) + ToHex(g) + ToHex(b));
    end.

  3. #3
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Freddy, I'd compare you to when it comes to coding ^^
    Ce ne sont que des gueux


  4. #4
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    More like ..

  5. #5
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Edited. Thanks.
    Ce ne sont que des gueux


  6. #6
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    D:< Stole.

  7. #7
    Join Date
    May 2007
    Location
    Seattle, WA
    Posts
    46
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks Freddy.

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
  •