{"id":166317,"date":"2013-01-20T02:07:03","date_gmt":"2013-01-19T22:07:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=166317"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=166317","title":{"rendered":"<span class=\"post_title\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f HSV \u0434\u043b\u044f \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043d\u043e\u0439 \u043b\u0435\u043d\u0442\u044b \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c AVR<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u043e\u0431\u0431\u0438 \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043d\u044b\u043c \u0440\u0435\u043a\u0432\u0438\u0437\u0438\u0442\u043e\u043c \u0438 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u2014 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u00ab\u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0435\u00bb \u043d\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0439 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043d\u043e\u0439 \u043b\u0435\u043d\u0442\u0435 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0440\u0430\u0434\u0443\u0433\u0438.<\/p>\n<p>  \u041f\u0438\u043a\u0441\u0435\u043b\u0438 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043d\u043e\u0439 \u043b\u0435\u043d\u0442\u044b \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0442 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u044d\u043a\u0440\u0430\u043d\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u0444\u043e\u043d\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0438. \u0427\u0451\u0440\u043d\u044b\u0439 \u043f\u0438\u043a\u0441\u0435\u043b\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u00ab\u0447\u0451\u0440\u043d\u044b\u043c\u00bb \u2014 \u043e\u043d \u0441\u043e\u043b\u044c\u0451\u0442\u0441\u044f \u0441 \u0444\u043e\u043d\u043e\u043c, \u0430 \u0432 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u00ab\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u043c\u00bb, \u043d\u043e \u0435\u0441\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u043a \u043b\u044e\u0431\u043e\u043c\u0443 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u043c\u0443 \u043a\u0430\u043d\u0430\u043b\u0443 \u2014 \u044d\u0442\u043e\u0442 \u043f\u0438\u043a\u0441\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u0435\u0442\u0438\u0442\u044c\u0441\u044f. \u0412 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u00ab\u0441\u0435\u0440\u044b\u0439\u00bb \u043f\u0438\u043a\u0441\u0435\u043b\u044c \u043e\u0442 \u0431\u0435\u043b\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u044f\u0440\u043a\u043e\u0441\u0442\u044c\u044e \u0438 \u0431\u0443\u0434\u0435\u0442 \u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0442\u0443\u0441\u043a\u043b\u044b\u043c, \u043d\u043e \u0432\u0441\u0451 \u0436\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u00ab\u0431\u0435\u043b\u044b\u043c\u00bb.<\/p>\n<p>  \u0425\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0446\u0432\u0435\u0442 \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u0432 24-bit RGB, \u043d\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 (\u043d\u0435\u043d\u0430\u0441\u044b\u0449\u0435\u043d\u043d\u044b\u0435 \u0438 \u044f\u0440\u043a\u0438\u0435 \u0446\u0432\u0435\u0442\u0430) \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0440\u0435\u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430\u0445. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0438\u043c\u043f\u0430\u0442\u0438\u0447\u043d\u044b\u0435 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u044b \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 RGB \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u2014 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u0435 RGB-\u0446\u0432\u0435\u0442\u043e\u0432 \u0434\u0430\u0451\u0442 \u043d\u0435 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e-\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (<a href=\"http:\/\/www.fastcompany.com\/3002676\/magical-tech-behind-paper-ipads-color-mixing-perfection#The_Mathematical_Conundrum_Illustrated\">\u0436\u0451\u043b\u0442\u044b\u0439 + \u0441\u0438\u043d\u0438\u0439 = \u0441\u0435\u0440\u044b\u0439<\/a>, \u0430 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u2014 \u0437\u0435\u043b\u0451\u043d\u044b\u0439). \u041c\u043e\u0434\u0435\u043b\u0438 <a href=\"http:\/\/en.wikipedia.org\/wiki\/HSL_and_HSV#Basic_principle\">HSL \u0438 HSV<\/a> \u043f\u043e\u0434\u043e\u0439\u0434\u0443\u0442 \u043b\u0443\u0447\u0448\u0435, \u043d\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043d\u0435\u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u0443\u044e \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0443. \u0423\u0434\u043e\u0431\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0446\u0432\u0435\u0442\u0430 \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0445 RGB-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u2014 \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043e \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043d\u0430\u043c \u043d\u0438 \u043a \u0447\u0435\u043c\u0443, \u0430 \u0434\u0435\u043b\u0435\u043d\u0438\u0435 (\u043a\u0440\u043e\u043c\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439 \u0434\u0432\u043e\u0439\u043a\u0438) \u0438 \u0432\u043e\u0432\u0441\u0435 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0414\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u043d\u0443\u0436\u0434 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c HSV (HSB) \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430\u043c\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 (\u043d\u0435\u043c\u043d\u043e\u0433\u043e magic numbers).<\/p>\n<ul>\n<li>Hue \u2014 \u0442\u043e\u043d, \u0446\u0438\u043a\u043b\u0438\u0447\u043d\u0430\u044f \u0443\u0433\u043b\u043e\u0432\u0430\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430.<\/li>\n<li>Value, Brightness \u2014 \u044f\u0440\u043a\u043e\u0441\u0442\u044c, \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0430\u043b\u044c\u0444\u0430-\u043a\u0430\u043d\u0430\u043b, \u043f\u0440\u0438 <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?V = 0\" alt=\"V = 0\"\/> \u043f\u0438\u043a\u0441\u0435\u043b\u044c \u043d\u0435 \u0441\u0432\u0435\u0442\u0438\u0442\u0441\u044f, \u043f\u0440\u0438 <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?V = V_m_a_x = 17\" alt=\"Vmax = 17\"\/> \u2014 \u0441\u0432\u0435\u0442\u0438\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u044f\u0440\u043a\u043e, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?H\" alt=\"H\"\/> \u0438 <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?S\" alt=\"S\"\/>.<\/li>\n<li>Saturation. \u0421 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u0444\u043e\u043d\u0430, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?S = 0\" alt=\"S = 0\"\/> \u0434\u0430\u0434\u0443\u0442 \u043d\u0435 \u0441\u0435\u0440\u044b\u0439 \u0446\u0432\u0435\u0442, \u0430 \u0431\u0435\u043b\u044b\u0439 \u0440\u0430\u0437\u043d\u043e\u0439 \u044f\u0440\u043a\u043e\u0441\u0442\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?W = S_m_a_x - S\" alt=\"W = Smax - S\"\/> \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c Whiteness \u2014 \u043e\u043d \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u00ab\u0431\u0435\u043b\u0438\u0437\u043d\u044b\u00bb \u0446\u0432\u0435\u0442\u0430. \u041f\u0440\u0438 <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?W = 0, S = S_m_a_x = 15\" alt=\"W = 0, S = Smax = 15\"\/> \u0446\u0432\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f Hue, \u043f\u0440\u0438 <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?S = 0, W = W_m_a_x = 15\" alt=\"S=0, W = Wmax = 15\"\/> \u0446\u0432\u0435\u0442 \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u0431\u0443\u0434\u0435\u0442 \u0431\u0435\u043b\u044b\u043c.<\/li>\n<\/ul>\n<p>  \u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u043d\u0430 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u043c \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 \u043e\u0434\u043d\u0443 \u0448\u0435\u0441\u0442\u0443\u044e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u043d\u0430 (\u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u043a\u0442\u043e\u0440\u0430), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?H_m_a_x\" alt=\"Hmax\"\/> \u0443\u0434\u043e\u0431\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0432\u043d\u043e\u0435 <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?6 * 2^x\" alt=\"6 * 2^x\"\/>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 48 \u0438\u043b\u0438 96. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0443\u0434\u043e\u0431\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c RGB-\u0446\u0432\u0435\u0442, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 128 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u043a\u0440\u0443\u0433. \u0412 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 HSV\/HSL <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?H_m_a_x = 360\" alt=\"Hmax = 360\"\/>, \u0432 MS Paint \u2014 240, \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445 \u2014 255.<\/p>\n<p>  \u041f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?B_m_a_x = 17\" alt=\"Bmax = 17\"\/> \u0438 <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?W_m_a_x = 15\" alt=\"Wmax = 15\"\/> \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?B*W\" alt=\"B*W\"\/> \u0434\u0430\u0451\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043b\u0435\u0436\u0430\u0449\u0438\u0439 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?0..255\" alt=\"0..255\"\/>.<\/p>\n<p>  \u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f HSV, \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0432 \u0440\u0430\u0441\u0447\u0451\u0442\u0435 \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u0430\u044f 8-\u0431\u0438\u0442\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u043f\u0440\u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430\u0445 <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?H = 0..11\" alt=\"H = 0..11\"\/>, <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?B = 0..17\" alt=\"B = 0..17\"\/> \u0438 <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?W = 0..3\" alt=\"W = 0..3\"\/> \u0434\u0430\u0451\u0442 \u043d\u0430\u043c <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?12*18*4 = 864\" alt=\"12*18*4 = 864\"\/> \u0446\u0432\u0435\u0442\u0430, \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f, \u0430 \u0447\u0430\u0441\u0442\u044c \u043e\u0442\u0441\u0442\u043e\u0438\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 (<em>\u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e\u0441\u0442\u0438 \u0440\u0430\u0434\u0438 \u0437\u0430\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u044d\u0442\u0438\u043c \u0433\u0440\u0435\u0448\u0430\u0442 \u0432\u0441\u0435 \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u044e\u0449\u0438\u0435 H \u2014 \u043d\u0430\u0442\u044f\u043d\u0443\u0442\u044c \u0442\u0440\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043a\u0443\u0431\u0430 \u043d\u0430 \u043a\u043e\u043d\u0443\u0441 \u043d\u0435 \u0438\u0441\u043a\u0430\u0437\u0438\u0432 \u0434\u043b\u0438\u043d\u044b \u043d\u0435 \u0441\u043c\u043e\u0433 \u0431\u044b \u0438 \u041c\u0435\u0440\u043a\u0430\u0442\u043e\u0440<\/em>). \u0426\u0438\u0444\u0440\u0430 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0441\u043a\u0443\u0434\u043d\u043e\u0439 \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 24-\u0431\u0438\u0442\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c \u0432 \u0442\u0438\u043f\u0438\u0447\u043d\u043e\u043c \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0435 (<strong>16,7 \u043c\u043b\u043d<\/strong> \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0446\u0432\u0435\u0442\u043e\u0432), \u043d\u043e \u0435\u0451 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043d\u044b\u0439 \u0440\u0435\u043a\u0432\u0438\u0437\u0438\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u043d\u044c\u0448\u0435 \u0438 \u0441\u0435\u043c\u044c \u0446\u0432\u0435\u0442\u043e\u0432 \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0431\u044b\u043b\u0438 \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u043c \u0431\u043e\u043d\u0443\u0441\u043e\u043c. \u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0446\u0432\u0435\u0442\u0430 \u0432 \u0442\u0430\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0434\u0432\u0443\u0445 \u0431\u0430\u0439\u0442\u0430\u0445.<\/p>\n<p>  \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 HSV \u043c\u043e\u0436\u043d\u043e \u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0432\u044b\u0448\u0430\u0442\u044c \u0434\u043e \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e <img decoding=\"async\" src=\"http:\/\/latex.codecogs.com\/gif.download?W = 0..15\" alt=\"W = 0..15\"\/> \u0438 96 \u0442\u043e\u043d\u043e\u0432, \u0447\u0442\u043e \u0434\u0430\u0451\u0442 \u0443\u0436\u0435 <strong>27,6<\/strong> \u0442\u044b\u0441\u044f\u0447 \u043e\u0442\u0442\u0435\u043d\u043a\u043e\u0432. \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 (\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u2014 max_value, max_whiteness, sixth_hue):<\/p>\n<h2>\u041a\u043e\u0434<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">typedef struct __attribute__ ((__packed__)) {     uint8_t r;     uint8_t g;     uint8_t b; } RGB_t;  typedef struct __attribute__ ((__packed__)) {     uint8_t h;     uint8_t s;     uint8_t v; } HSV_t;  const uint8_t max_whiteness = 15; const uint8_t max_value = 17;  const uint8_t sixth_hue = 16; const uint8_t third_hue = sixth_hue * 2; const uint8_t half_hue = sixth_hue * 3; const uint8_t two_thirds_hue = sixth_hue * 4; const uint8_t five_sixths_hue = sixth_hue * 5; const uint8_t full_hue = sixth_hue * 6;  inline RGB_t rgb(uint8_t r, uint8_t g, uint8_t b) {     return (RGB_t) {r, g, b}; }  inline HSV_t hsv(uint8_t h, uint8_t s, uint8_t v) {     return (HSV_t) {h, s, v}; }  const RGB_t black = {0, 0, 0};  RGB_t hsv2rgb(HSV_t hsv) {     if (hsv.v == 0) return black;          uint8_t high = hsv.v * max_whiteness;\/\/channel with max value         if (hsv.s == 0) return rgb(high, high, high);          uint8_t W = max_whiteness - hsv.s;     uint8_t low = hsv.v * W;\/\/channel with min value     uint8_t rising = low;     uint8_t falling = high;          uint8_t h_after_sixth = hsv.h % sixth_hue;     if (h_after_sixth &gt; 0) {\/\/not at primary color? ok, h_after_sixth = 1..sixth_hue - 1         uint8_t z = hsv.s * uint8_t(hsv.v * h_after_sixth) \/ sixth_hue;         rising += z;         falling -= z + 1;\/\/it's never 255, so ok     }          uint8_t H = hsv.h;     while (H &gt;= full_hue) H -= full_hue;          if (H &lt; sixth_hue) return rgb(high, rising, low);     if (H &lt; third_hue) return rgb(falling, high, low);     if (H &lt; half_hue) return rgb(low, high, rising);     if (H &lt; two_thirds_hue) return rgb(low, falling, high);     if (H &lt; five_sixths_hue) return rgb(rising, low, high);     return rgb(high, low, falling); } <\/code><\/pre>\n<p>  P.S.<br \/>  TeX-\u043a\u043e\u0434\u044b \u0432 \u0442\u043e\u043f\u0438\u043a \u0432\u043a\u043b\u044e\u0447\u0438\u043b \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0438\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0435\u0435 \u2014 \u043d\u0430\u043c\u0435\u043a\u043d\u0438\u0442\u0435 \u0432 \u041f\u041c.<br \/>  \u0415\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u2014 \u043c\u043e\u0433\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u044f\u0441\u043d\u0438\u0442\u044c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u0441\u0447\u0451\u0442\u0430 HSV, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0445\u0430\u043d\u0438\u043a\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 rising\/falling \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0432 \u00ab\u0442\u0430\u043a\u043e\u0439\u00bb HSV.    \t \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/166317\/\"> http:\/\/habrahabr.ru\/post\/166317\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u043e\u0431\u0431\u0438 \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043d\u044b\u043c \u0440\u0435\u043a\u0432\u0438\u0437\u0438\u0442\u043e\u043c \u0438 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u2014 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u00ab\u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0435\u00bb \u043d\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0439 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043d\u043e\u0439 \u043b\u0435\u043d\u0442\u0435 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0440\u0430\u0434\u0443\u0433\u0438.<\/p>\n<p>  \u041f\u0438\u043a\u0441\u0435\u043b\u0438 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043d\u043e\u0439 \u043b\u0435\u043d\u0442\u044b \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0442 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u044d\u043a\u0440\u0430\u043d\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u0444\u043e\u043d\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0438. \u0427\u0451\u0440\u043d\u044b\u0439 \u043f\u0438\u043a\u0441\u0435\u043b\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u00ab\u0447\u0451\u0440\u043d\u044b\u043c\u00bb \u2014 \u043e\u043d \u0441\u043e\u043b\u044c\u0451\u0442\u0441\u044f \u0441 \u0444\u043e\u043d\u043e\u043c, \u0430 \u0432 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u00ab\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u043c\u00bb, \u043d\u043e \u0435\u0441\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u043a \u043b\u044e\u0431\u043e\u043c\u0443 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u043c\u0443 \u043a\u0430\u043d\u0430\u043b\u0443 \u2014 \u044d\u0442\u043e\u0442 \u043f\u0438\u043a\u0441\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u0435\u0442\u0438\u0442\u044c\u0441\u044f. \u0412 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u00ab\u0441\u0435\u0440\u044b\u0439\u00bb \u043f\u0438\u043a\u0441\u0435\u043b\u044c \u043e\u0442 \u0431\u0435\u043b\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u044f\u0440\u043a\u043e\u0441\u0442\u044c\u044e \u0438 \u0431\u0443\u0434\u0435\u0442 \u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0442\u0443\u0441\u043a\u043b\u044b\u043c, \u043d\u043e \u0432\u0441\u0451 \u0436\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u00ab\u0431\u0435\u043b\u044b\u043c\u00bb.<\/p>\n<p>  \u0425\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0446\u0432\u0435\u0442 \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u0432 24-bit RGB, \u043d\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 (\u043d\u0435\u043d\u0430\u0441\u044b\u0449\u0435\u043d\u043d\u044b\u0435 \u0438 \u044f\u0440\u043a\u0438\u0435 \u0446\u0432\u0435\u0442\u0430) \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0440\u0435\u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430\u0445. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0438\u043c\u043f\u0430\u0442\u0438\u0447\u043d\u044b\u0435 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u044b \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 RGB \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u2014 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u0435 RGB-\u0446\u0432\u0435\u0442\u043e\u0432 \u0434\u0430\u0451\u0442 \u043d\u0435 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e-\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (<a href=\"http:\/\/www.fastcompany.com\/3002676\/magical-tech-behind-paper-ipads-color-mixing-perfection#The_Mathematical_Conundrum_Illustrated\">\u0436\u0451\u043b\u0442\u044b\u0439 + \u0441\u0438\u043d\u0438\u0439 = \u0441\u0435\u0440\u044b\u0439<\/a>, \u0430 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u2014 \u0437\u0435\u043b\u0451\u043d\u044b\u0439). \u041c\u043e\u0434\u0435\u043b\u0438 <a href=\"http:\/\/en.wikipedia.org\/wiki\/HSL_and_HSV#Basic_principle\">HSL \u0438 HSV<\/a> \u043f\u043e\u0434\u043e\u0439\u0434\u0443\u0442 \u043b\u0443\u0447\u0448\u0435, \u043d\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043d\u0435\u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u0443\u044e \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0443. \u0423\u0434\u043e\u0431\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0446\u0432\u0435\u0442\u0430 \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0445 RGB-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u2014 \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043e \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043d\u0430\u043c \u043d\u0438 \u043a \u0447\u0435\u043c\u0443, \u0430 \u0434\u0435\u043b\u0435\u043d\u0438\u0435 (\u043a\u0440\u043e\u043c\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439 \u0434\u0432\u043e\u0439\u043a\u0438) \u0438 \u0432\u043e\u0432\u0441\u0435 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-166317","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/166317","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=166317"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/166317\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=166317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=166317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=166317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}