IncColors - MetaTrader 5 Library | MT5 EA Download - MetaTrader 5 Resources
This class contains functions for working with colors. It has color conversion and other useful features.
Convert RGB to HSV
Blank RGB to HSV ( double A R, double aG, double B, double & OH, double & OS, double & oV)
Function from http://www.easyrgb.com/index.php?X=MATH. All these functions take 6 parameters: the first 3 are arguments, and the next 3 are conversion results, passed by reference.
Convert RGB to XYZ
Blank RGB to XYZ ( double A R, double aG, double B, double &oX, double &oY, double &oZ)Convert XYZ to RGB
Blank XYZ to RGB ( double ax, double yes, double aZ, double & or, double &oG, double &oB)Convert XYZ to Yxy
Blank
Convert Yxy to XYZ
BlankConvert XYZ to HunterLab
BlankConvert HunterLab to XYZ
Blank HunterLabToXYZ ( double an L, double ah, double ab, double &oX, double &oY, double &oZ)Convert XYZ to CIELab
BlankConvert CIELab to ToXYZ
Blank CIELabToXYZ ( double a CIEL, double aCIEL, double aCIEb, double &oX, double &oY, double &oZ)Convert CIELab to CIELCH
blank CIELab to CIELCH ( double a CIEL, double aCIEb, double aCIEb, double &oCIEL, double &oCIEC, double &oCIEH)
Convert CIELCH to CIELab
Blank CIELCH to CIELab ( double a CIEL, double aCIEC, double a CIEH, double &oCIEL, double &oCIEa, double &oCIEb)
Convert XYZ to CIELuv
blankXYZ to CIELuv( double ax, double yes, double aZ, double &oCIEL, double &ec, double &oCIEv)CIELuv to XYZ
Blank CIELuvToXYZ ( double a CIEL, double Euratom, double aCIEv, double &oX, double &oY, double &oZ)Convert RGB to HSL
Blank RGB to HSL ( double the A R, double the aG, double the B, double the & OH, double the & OS, double the & oL)Convert HSL to RGB
Blank HSL to RGB ( double ah, double as, double a L, double & or, double &oG, double &oB)
Convert RGB to HSV
Blank RGB to HSV ( double A R, double aG, double B, double & OH, double & OS, double & oV)Convert HSV to RGB
Blank HSV to RGB ( double ah, double as, double a V, double & or, double &oG, double &oB)Convert RGB to CMY
Blank RGB to CMY ( double A R, double aG, double B, double & oC, double & om, double & oY)Convert CMY to RGB
Blank CMY to RGB ( Double AC, Double Yes, Double Yes, Double & or, Double &oG, Double &oB)Convert CMY to CMYK
Blank CMY to CMYK ( Double AC, Double Yes, Double Yes, Double &oC, Double &Om, Double &oY, Double &Ok)Convert CMYK to CMY
Blank CMYK to CMY ( Double AC, Double Yes, Double Yes, Double AK, Double &oC, Double &Om, Double &oY)
Other functions
Get RGB components
The first parameter - the color, the next parameters are the color components, passed by reference.
Convert blank color to RGB ( color color, double &aR, double &aG, double &aB)Get R components
Double the acquisition of R ( color a color)Get G component
Double the acquisition of G ( color a color)Get B component
Get double the B ( color a color)
Convert RGB to color
Color RGB conversion color ( double an R, double aG, double aB)Get a mixed color between two colors
color mix color( color aCol1, color aCol2, double AK) // aK - from 0 to 1Get array with color gradient
blank slope( color &acolor[], // color list Color &aoutput[], //output array Integer an output count, // the size of the output array boolean one cycle = false // cycle gradient (output array ends with starting color) )Another simple conversion RGB -> XYZ and its inverse XYZ->RGB
Blank RGB to XYZ Simple ( double A R , double A G, double B, double & onegative color
color negative ( color a color)
Find colors closest to standard web colors
Attachment download
📎 inccolors.mqh (20.48 KB)
Source: MQL5 #888
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •