Библиотека содержит функции для преобразования цвета
Код:
Copyright © 2021 Abyss Morgan. All rights reserved.
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);
Код:
Пример 1:
new col = RGB::RGBAToARGB(0xFF6600FF); //return 0xFFFF6600;
Пример 2:
new red, green, blue, alpha;
RGB::RGBAToHex(0xFF6600AA,red,green,blue,alpha); //return red = 0xFF; green = 0x66; blue = 0x00; alpha = 0xAA;
Пример 3:
new r = RGB::GetRHexFromRGBA(0xFF6600AA); //return 0xFF;
Пример 4:
new r = RGB::GetRFromRGBA(0xFF6600AA); //return 0xFF000000;