38 std::vector<std::vector<unsigned int>> RGB={{ 0, 0, 0},
51 std::vector<std::vector<unsigned int>> HSL={{ 0, 0, 0},
67 for(i=0;i<RGB.size();i++)
72 std::cout<<
"{"<<std::setw(3)<<RGB[i][0]<<
","<<std::setw(3)<<RGB[i][1] <<
","<<std::setw(3)<<RGB[i][2]<<
"}";
73 std::cout<<
"{"<<std::setw(3)<<HSL[i][0]<<
","<<std::setw(3)<<HSL[i][1] <<
","<<std::setw(3)<<HSL[i][2]<<
"}";
74 std::cout<<
"{"<<std::setw(3)<<round(h) <<
","<<std::setw(3)<<round(s)<<
","<<std::setw(3)<<round(l)<<
"}";
76 if( (round(h)==HSL[i][0])&&(round(s)==HSL[i][1])&&(round(l)==HSL[i][2]) )
79 std::cout<<
"[ERROR]\n";
void RGB2HSL(unsigned char r, unsigned char g, unsigned char b, double &h, double &s, double &l)
Transforma de coordenadas RGB a HSL