ARGB
ColourValue = ARGB(Alpha, Red, Green, Blue)
 
Parameters:

    Alpha = The Amount of Alpha Channel in this colour. (0 to 255)
    Red = The Amount of RED in this colour. (0 to 255)
    Green = The Amount of GREEN in this colour. (0 to 255)
    Blue = The Amount of BLUE in this colour. (0 to 255)
Returns:

    ColourValue = The ARGB's levels mixed into a packed RGB colour value
 

      The ARGB function takes the three 8bit colour channels (R)ed, (G)reen) and (B)lue and blends them with the ALPHA channel to form the final packed 32bit colour value. These colour values can be then used to set the ink colour of text or other graphics operations.

      You can think of ARGB as way of mixing the channels together. Where each component has a valid range from 0 to 255 (so the components are of byte range). Where Zero represents that a channel is not present and 255 means this channel is fully present. We create colours by bending the colour channels/levels together.




FACTS:


      * ARGB values are always 32bit integers in the following form $AARRGGBB (Hex$).

      * The values the ARGB command return are just integer numbers. So if you remember a colour value, you can use the value directly when setting the colour of graphics operation.

      * If you wish to seperate the A, R, G, or B values from any packed 32bit colour value, use the RGBA, RGBR, RGBG & RGBB functions.




Mini Tutorial:


      This example creates a packad ARGB colour value them retrieves the A,R,G,B fields from it.

  
  
; Make a variable called MyCOlour and assign it a 32bit ARGB colour value
  MyColour = ARGB(128,25,100,200)
  
; Print The ALPHA level from the Mycolour Variable
  Print RgbA(MyColour)
  
; Print The RED level from the Mycolour Variable
  Print RgbR(MyColour)
  
; Print The GREEN level from the Mycolour Variable
  Print RgbG(MyColour)
  
; Print The BLUE level from the Mycolour Variable
  Print RgbB(MyColour)
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  
  




This example would output.

  
  128
  25
  100
  200
  

 
Related Info: RGB | RGBA | RGBB | RGBG | RGBR | RndRGB :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com