[Include] RGB RGBA ARGB Conversion
#1

Include contain functions for color conversion

PHP Code:
/****************************************************************************************************
 *                                                                                                  *
 *                                   )(   R G B A Conversion   )(                                   *
 *                                                                                                  *
 * Copyright © 2019 Abyss Morgan. All rights reserved.                                              *
 *                                                                                                  *
 * Website:  adm.ct8.pl                                                                             *
 * Download: adm.ct8.pl/r/download                                                                  *
 *                                                                                                  *
 * Plugins: None                                                                                    *
 * Modules: None                                                                                    *
 *                                                                                                  *
 * File Version: 2.5.0                                                                              *
 *                                                                                                  *
 * Functions:                                                                                       *
 * RGB::RGBAToHex(color,&red,&green,&blue,&alpha);                                                  *
 * RGB::RGBToHex(color,&red,&green,&blue);                                                          *
 * RGB::HexToRGBA(red,green,blue,alpha);                                                            *
 * RGB::HexToARGB(red,green,blue,alpha);                                                            *
 * RGB::HexToRGB(red,green,blue);                                                                   *
 * RGB::RGBAToRGB(color);                                                                           *
 * RGB::RGBToRGBA(color,alpha);                                                                     *
 * RGB::RGBToARGB(color,alpha);                                                                     *
 * RGB::ARGBToRGB(color);                                                                           *
 * RGB::RGBAToARGB(color);                                                                          *
 * RGB::ARGBToRGBA(color);                                                                          *
 * RGB::GetRFromRGBA(color);                       //RGBA:0xFAB0A0FF R:0xFA000000                   *
 * RGB::GetGFromRGBA(color);                       //RGBA:0xFAB0A0FF G:0x00B00000                   *
 * RGB::GetBFromRGBA(color);                       //RGBA:0xFAB0A0FF B:0x0000A000                   *
 * RGB::GetAFromRGBA(color);                       //RGBA:0xFAB0A0FF A:0x000000FF                   *
 * RGB::GetRHexFromRGBA(color);                    //RGBA:0xFAB0A0FF R:0xFA                         *
 * RGB::GetGHexFromRGBA(color);                    //RGBA:0xFAB0A0FF G:0xB0                         *
 * RGB::GetBHexFromRGBA(color);                    //RGBA:0xFAB0A0FF B:0xA0                         *
 * RGB::GetAHexFromRGBA(color);                    //RGBA:0xFAB0A0FF A:0xFF                         *
 * RGB::GetColorRGBA(color);                       //Return {RGB}                                   *
 * RGB::GetColorRGB(color);                        //Return {RGB}                                   *
 * RGB::GetColorARGB(color);                       //Return {RGB}                                   *
 * RGB::AdjustColorLuminance(color,Float:adjust);                                                   *
 *                                                                                                  *
 ****************************************************************************************************/ 
Download:
RGB.inc

Website:
Color Converter

Example 1:
PHP Code:
new col RGB::RGBAToARGB(0xFF6600FF); //return 0xFFFF6600; 
Example 2:
PHP Code:
new redgreenbluealpha;
RGB::RGBAToHex(0xFF6600AA,red,green,blue,alpha); //return red = 0xFF; green = 0x66; blue = 0x00; alpha = 0xAA; 
Example 3:
PHP Code:
new RGB::GetRHexFromRGBA(0xFF6600AA); //return 0xFF; 
Example 4:
PHP Code:
new RGB::GetRFromRGBA(0xFF6600AA); //return 0xFF000000; 
Reply


Messages In This Thread
RGB RGBA ARGB Conversion - by AbyssMorgan - 03.10.2015, 17:56
Re: RGB RGBA ARGB Conversion - by AbyssMorgan - 03.02.2016, 15:27
Re: RGB RGBA ARGB Conversion - by SecretBoss - 03.02.2016, 17:44
Re: RGB RGBA ARGB Conversion - by AbyssMorgan - 06.02.2016, 17:36
Re: RGB RGBA ARGB Conversion - by BlackBank - 09.02.2016, 12:12
Re: RGB RGBA ARGB Conversion - by AbyssMorgan - 05.06.2016, 19:55
Re: RGB RGBA ARGB Conversion - by gurmani11 - 24.07.2016, 16:20
Re: RGB RGBA ARGB Conversion - by AbyssMorgan - 23.08.2016, 08:47
Re: RGB RGBA ARGB Conversion - by YouHack - 03.05.2017, 17:11
Re: RGB RGBA ARGB Conversion - by Switel12 - 04.03.2019, 06:16

Forum Jump:


Users browsing this thread: 2 Guest(s)