Rgb16toRgb24
24BitRgbColour = Rgb16toRgb24(RgbColour)
 
Parameters:

    RgbColour = The 24 Bit RGB colour you want to convert
Returns:

    24BitRgbColour = The 24 bit RGB colour in 888 format
 

      The Rgb16ToRgb24 function will convert a 16bit RGB colour in 565 format to a 24bit RGB colour value in format 888.



FACTS:


      * The input colour must in 16bit (rrrrggggggbbbbb 565) format.

      * The output colour will be in the form. $--RRGGBB



Mini Tutorial:


      Show some examples

  
  
; Define a Purple colour (24bit) in variable Col
  Col= RGB(255,15,240)
  
; Print the Colour Value in Hex$
  Print Hex$(col)
  
; Convert the 24bit colour to a 16bit equivalent
; Note: some of the lower bits of the colour will
; be lose during the conversion
  NewCol_16Bit = RGB24ToRGB16(Col)
  
; Print the Colour Value in Hex$
  Print Hex$(NewCol_16Bit)
  
; Now Conmvert the 16 bit colour back to 24 bit
  
  NewCol_24Bit = RGB16ToRGB24( NewCol_16Bit)
  Print Hex$(NewCol_24Bit)
  
  
  Sync
  WaitKey
  


This example would output.

  
  $00ff0ff0
  $0000f87e
  $00f00cf0
  

 
Related Info: ARGB | RGB | Rgb15toRgb24 | Rgb24toRgb15 | Rgb24toRgb16 | RGBB | RGBG | RGBR :
 


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