home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 January / PCWELT_1_2006.ISO / pcwsoft / autoit-v3-setup.exe / Include / Color.au3 < prev    next >
Encoding:
Text File  |  2005-01-12  |  2.3 KB  |  61 lines

  1. #include-once
  2.  
  3. ; ------------------------------------------------------------------------------
  4. ;
  5. ; AutoIt Version: 3.0
  6. ; Language:       English
  7. ; Description:    Functions that assist with color management.
  8. ;
  9. ; ------------------------------------------------------------------------------
  10.  
  11.  
  12. ;===============================================================================
  13. ;
  14. ; Description:      Get the red component of a given color.
  15. ; Syntax:           _ColorGetRed( $nColor )
  16. ; Parameter(s):     $nColor - The RGB color to work with (numeric).
  17. ; Requirement(s):   None
  18. ; Return Value(s):  On Success - Returns the component color in the range 0-255
  19. ;                   On Failure - None
  20. ; Author(s):        Jonathan Bennett <jon at hiddensoft com>
  21. ; Note(s):          None
  22. ;
  23. ;===============================================================================
  24. Func _ColorGetRed($nColor)
  25.     Return BitAND( BitShift($nColor, 16), 0xff)
  26. EndFunc   ;==>_ColorGetRed
  27.  
  28.  
  29. ;===============================================================================
  30. ;
  31. ; Description:      Get the green component of a given color.
  32. ; Syntax:           _ColorGetGreen( $nColor )
  33. ; Parameter(s):     $nColor - The RGB color to work with (numeric).
  34. ; Requirement(s):   None
  35. ; Return Value(s):  On Success - Returns the component color in the range 0-255
  36. ;                   On Failure - None
  37. ; Author(s):        Jonathan Bennett <jon at hiddensoft com>
  38. ; Note(s):          None
  39. ;
  40. ;===============================================================================
  41. Func _ColorGetGreen($nColor)
  42.     Return BitAND( BitShift($nColor, 8), 0xff)
  43. EndFunc   ;==>_ColorGetGreen
  44.  
  45.  
  46. ;===============================================================================
  47. ;
  48. ; Description:      Get the blue component of a given color.
  49. ; Syntax:           _ColorGetBlue( $nColor )
  50. ; Parameter(s):     $nColor - The RGB color to work with (numeric).
  51. ; Requirement(s):   None
  52. ; Return Value(s):  On Success - Returns the component color in the range 0-255
  53. ;                   On Failure - None
  54. ; Author(s):        Jonathan Bennett <jon at hiddensoft com>
  55. ; Note(s):          None
  56. ;
  57. ;===============================================================================
  58. Func _ColorGetBlue($nColor)
  59.     Return BitAND($nColor, 0xff)
  60. EndFunc   ;==>_ColorGetBlue
  61.