Here's the script for testing:
void OnStart() { color Main_color = C'213,0,0';//здесь ставите нужный цвет. Компилируете. Тот же цвет ставите в цветовой палитре виндоус. Сравниваете цвета. string Gradient[256]; //------------------------ Диапазон_оттенков(Main_color,Gradient); //------------------------ for(int a1 = 0; a1 < 256; a1++)Alert(__FUNCTION__," Gradient[",a1,"] ",Gradient[a1]); }
Here is the script for testing:
Thank you! It would be good to write code in English with comments and send such codes to the library...
Thank you! It would be good to write code in English with comments and send such codes to the library...
Agreed. I'll translate it in my spare time. You mean codebase?
The code base has a library section where such codes are stacked and updated.
I see.
Thank you! It would be good to write code in English with comments and send such codes to the library...
For CodeBade one should definitely write it in the international language. But why insist on it in a Russian forum?
Personally I'm disgusted with this international... because I don't know it at all and I understand it much better in our native Russian.
In colourimetry, as I recall, there are a bunch of different systems.
There's probably a ready-made system out there that meets the needs, and formulas for switching between them.
In colourimetry, as I recall, there are a bunch of different systems.
There's probably a ready-made system out there that meets the needs, and formulas to go between them.
I have one function. You send a colour, you get all the shades. Next, - any gradient can be drawn by simply doing an array loop.
A little later, I made a change. Initially, the function void. Doesn't return a value. But then I made it int type and added
return(Координата_исходного_цвета);
Thus, in addition to the array of shades, the function began to return the number of the cell in which the original colour sent to it is located. This makes it easier to draw a gradient. From the original colour you can move either to the left or to the right along the array.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
For a month, I stubbornly solved the problem of decomposing color into shades. The task turned out to be difficult. I took the Windows color palette as the basis for the study (the one in the chart properties ). After a long study, I still found patterns. And here's how: