{"id":301701,"date":"2020-04-12T09:00:14","date_gmt":"2020-04-12T09:00:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=301701"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-04-12T09:00:14","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=301701","title":{"rendered":"\u0417\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u0440\u043e RGB \u0438 HEX"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/496768\/\">\u0412 CSS \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u043e\u0432. \u041e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 \u2014 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 HSL. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u0432\u0430\u043c, \u043a\u0430\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0442\u0430\u043b\u044c\u0449\u0438\u043a\u0430.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 HSL<\/h2>\n<p>  \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 HSL \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043e \u043e\u0442 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u044b\u0445 \u0431\u0443\u043a\u0432 Hue (\u043e\u0442\u0442\u0435\u043d\u043e\u043a), Saturate (\u043d\u0430\u0441\u044b\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u044c) \u0438 Lightness (\u0441\u0432\u0435\u0442\u043b\u043e\u0442\u0430 \u0438\u043b\u0438 \u044f\u0440\u043a\u043e\u0441\u0442\u044c). <\/p>\n<p>  <b>\u041e\u0442\u0442\u0435\u043d\u043e\u043a<\/b> \u2014 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0432\u0435\u0442\u0430 \u043d\u0430 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u043c \u043a\u0440\u0443\u0433\u0435 \u0438 \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u0433\u0440\u0430\u0434\u0443\u0441\u0430\u0445. 0\u00b0 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u0440\u0430\u0441\u043d\u043e\u043c\u0443 \u0446\u0432\u0435\u0442\u0443, 120\u00b0 \u2014 \u0437\u0435\u043b\u0451\u043d\u043e\u043c\u0443, \u0430 240\u00b0 \u2014 \u0441\u0438\u043d\u0435\u043c\u0443. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0442\u0442\u0435\u043d\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043e\u0442 0 \u0434\u043e 359.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/8g\/pu\/fe\/8gpufevs8kjhl22s8tdyfrqgzo0.png\"><\/p>\n<p>  <b>\u041d\u0430\u0441\u044b\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e<\/b> \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0446\u0432\u0435\u0442\u0430, \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u0445 \u043e\u0442 0% \u0434\u043e 100%. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0446\u0432\u0435\u0442\u0430 \u043e\u0442 \u0441\u0435\u0440\u043e\u0433\u043e \u0442\u043e\u0439 \u0436\u0435 \u044f\u0440\u043a\u043e\u0441\u0442\u0438. <\/p>\n<p>  <b>\u042f\u0440\u043a\u043e\u0441\u0442\u044c<\/b> \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0437\u0443\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0446\u0432\u0435\u0442 \u044f\u0440\u043a\u0438\u0439 \u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u0445 \u043e\u0442 0% \u0434\u043e 100%. \u041c\u0430\u043b\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u0435\u043b\u0430\u044e\u0442 \u0446\u0432\u0435\u0442 \u0442\u0435\u043c\u043d\u0435\u0435, \u0430 \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u0441\u0432\u0435\u0442\u043b\u0435\u0435, \u043a\u0440\u0430\u0439\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f 0% \u0438 100% \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0447\u0451\u0440\u043d\u043e\u043c\u0443 \u0438 \u0431\u0435\u043b\u043e\u043c\u0443 \u0446\u0432\u0435\u0442\u0443.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/to\/eg\/gm\/toeggmpx3twvkn6ytkyvomfqoh8.png\"><\/p>\n<h2>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 HSL()<\/h2>\n<p>  \u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e HSL \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0446\u0432\u0435\u0442\u0430 <b>\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430<\/b>. \u042d\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0434 \u0432\u0430\u043c\u0438 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043b\u0435\u0433\u043a\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0446\u0432\u0435\u0442 \u044f\u0440\u0447\u0435, \u0442\u0435\u043c\u043d\u0435\u0435, \u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0441\u044b\u0449\u0435\u043d\u043d\u044b\u043c \u0438\u043b\u0438 \u043e\u0431\u0435\u0441\u0446\u0432\u0435\u0447\u0438\u0432\u0430\u0442\u044c. \u0418 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0435\u0433\u043e \u043e\u0442\u0442\u0435\u043d\u043e\u043a. \u0418\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u2014 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043e\u0442\u0442\u0435\u043d\u043a\u0438, \u043d\u0435 \u043c\u0435\u043d\u044f\u044f \u0438\u0445 \u043d\u0430\u0441\u044b\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0438\u043b\u0438 \u044f\u0440\u043a\u043e\u0441\u0442\u044c. \u0417\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0430\u043a\u0438\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0438 \u0431\u0435\u0437 \u043d\u0438\u0445.<\/p>\n<h2>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432<\/h2>\n<p>  <\/p>\n<h3>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435 \u0446\u0432\u0435\u0442\u0430 \u0442\u043e\u0433\u043e \u0436\u0435 \u043e\u0442\u0442\u0435\u043d\u043a\u0430<\/h3>\n<p>  \u041e\u0434\u043d\u0430 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447: \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043e\u0442\u0442\u0435\u043d\u043e\u043a, \u043d\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0439. \u0412 \u043f\u043e\u0451\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u044d\u0442\u043e \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0430\u043b\u0435\u0440\u0442, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0446\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430, \u0444\u043e\u043d\u0430 \u0438 \u043e\u0431\u0432\u043e\u0434\u043a\u0438 \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d \u043e\u0442\u0442\u0435\u043d\u043e\u043a \u0438 \u043d\u0430\u0441\u044b\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043d\u043e \u0440\u0430\u0437\u043d\u0443\u044e \u044f\u0440\u043a\u043e\u0441\u0442\u044c:<\/p>\n<pre><code class=\"css\">.success {     border-color:     hsl(120, 50%, 40%);   color:            hsl(120, 50%, 20%);   background-color: hsl(120, 50%, 90%); } <\/code><\/pre>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 300px; position: relative;\"><iframe src=\"https:\/\/codepen.io\/cawa-93\/embed\/preview\/ExVadMM?height=300&amp;slug-hash=ExVadMM&amp;default-tabs=css%2Cresult&amp;host=https%3A%2F%2Fcodepen.io\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  \u0412\u0438\u0434\u0438\u0442\u0435, \u043a\u0430\u043a \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u0438 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e? \u0421\u0440\u0430\u0437\u0443 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u043e\u0434\u043d\u043e \u00ab\u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e\u00bb \u0446\u0432\u0435\u0442\u043e\u0432. \u0412 \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u0431\u044b \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"css\">\/* rgb *\/ .alert {   border-color:     rgb(51, 153, 51);   color:            rgb(25, 77, 25);   background-color: rgb(217, 242, 217); }  \/* hex *\/ .alert {   border-color:     #339933;   color:            #194d19;   background-color: #d9f2d9; } <\/code><\/pre>\n<p>  \u041d\u0435 \u0437\u043d\u0430\u044e \u043a\u0430\u043a \u0432\u0430\u043c, \u0430 \u043c\u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e \u0433\u043b\u044f\u0434\u044f \u043d\u0430 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u043b\u0438 \u043a\u0430\u043a-\u0442\u043e \u044d\u0442\u0438 \u0446\u0432\u0435\u0442\u0430 \u0438\u043b\u0438 \u043d\u0435\u0442. <\/p>\n<p>  \u041d\u043e \u044d\u0442\u043e \u043c\u0435\u043b\u043e\u0447\u0438. \u041d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u043c\u043e\u0449\u044c \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 css custom properties.<\/p>\n<p>  \u041a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0441\u044f, \u0441\u043b\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u0440\u0443\u043a\u0430\u043c\u0438. \u0415\u0441\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0443\u044e \u0446\u0432\u0435\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0442\u0435\u043d\u043e\u043a, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0442\u043e\u0433\u0434\u0430 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043b\u0435\u0433\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0439 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0438\u0437\u043c\u0435\u043d\u044f\u044f \u0432 \u043d\u0435\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043e\u0442\u0442\u0435\u043d\u043e\u043a. \u0410 \u0432\u0441\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043d\u0435\u0433\u043e.<\/p>\n<pre><code class=\"css\">.alert {   border-color:     hsl(var(--hue), 50%, 40%);   color:            hsl(var(--hue), 50%, 20%);   background-color: hsl(var(--hue), 50%, 90%); }<\/code><\/pre>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 300px; position: relative;\"><iframe src=\"https:\/\/codepen.io\/cawa-93\/embed\/preview\/zYvxmRm?height=300&amp;slug-hash=zYvxmRm&amp;default-tabs=css%2Cresult&amp;host=https%3A%2F%2Fcodepen.io\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h3>\u041e\u0431\u0435\u0441\u0446\u0432\u0435\u0447\u0438\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u0430\u044f \u043a\u043d\u043e\u043f\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 \u0441\u043d\u0438\u0436\u0435\u043d\u043d\u0443\u044e \u043d\u0430\u0441\u044b\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u044c. \u041e\u043d\u0430 \u0432\u0441\u0451 \u0435\u0449\u0451 \u0438\u043c\u0435\u0435\u0442 \u0435\u0434\u0432\u0430 \u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0439 \u0441\u0438\u043d\u0438\u0439 \u043e\u0442\u0442\u0435\u043d\u043e\u043a, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u0447\u0442\u0438 \u0441\u0435\u0440\u0430\u044f. \u0410 \u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043a\u043d\u043e\u043f\u043a\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043e\u0442\u0442\u0435\u043d\u043e\u043a \u0438 \u043d\u0430\u0441\u044b\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0442\u0435\u043c\u043d\u0435\u0435.<\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 300px; position: relative;\"><iframe src=\"https:\/\/codepen.io\/cawa-93\/embed\/preview\/YzyPJNo?height=300&amp;slug-hash=YzyPJNo&amp;default-tabs=css%2Cresult&amp;host=https%3A%2F%2Fcodepen.io\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0442\u0440\u0435\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0439, \u043d\u043e \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u0446\u0432\u0435\u0442. \u0427\u0442\u043e \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 rgb \u0438\u043b\u0438 hex \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e.<\/p>\n<p>  \u041a\u0430\u043a \u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0434\u043c\u0435\u043d\u044f\u0442\u044c \u043e\u0442\u0442\u0435\u043d\u043e\u043a, \u043d\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044f \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0446\u0432\u0435\u0442\u0430 \u0432 \u0432\u0430\u0448\u0435\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435.<\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 300px; position: relative;\"><iframe src=\"https:\/\/codepen.io\/cawa-93\/embed\/preview\/pojvxXK?height=300&amp;slug-hash=pojvxXK&amp;default-tabs=css%2Cresult&amp;host=https%3A%2F%2Fcodepen.io\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h3>\u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0446\u0432\u0435\u0442\u0430<\/h3>\n<p>  \u041e\u0434\u043d\u0430 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043a\u0440\u0443\u0442\u044b\u0445 \u0442\u0435\u0445\u043d\u0438\u043a: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u0442\u0442\u0435\u043d\u043a\u0430, \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044f\u0441\u044c \u043e\u0442 \u0434\u0440\u0443\u0433\u043e\u0433\u043e. \u0414\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0432 calc(). <\/p>\n<pre><code class=\"css\">:root{   --hue: 120; }  header {   background-color: hsl(var(--hue), 30%, 20%) }  header button {   background-color: hsl(calc(var(--hue) + 130), 80%, 50%) } <\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u0442\u0442\u0435\u043d\u043e\u043a \u043a\u043d\u043e\u043f\u043a\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 (+130\u00b0 \u043d\u0430 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u043c \u043a\u0440\u0443\u0433\u0435) \u043e\u0442 \u043e\u0442\u0442\u0435\u043d\u043a\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 300px; position: relative;\"><iframe src=\"https:\/\/codepen.io\/cawa-93\/embed\/preview\/KKdwrXr?height=300&amp;slug-hash=KKdwrXr&amp;default-tabs=css%2Cresult&amp;host=https%3A%2F%2Fcodepen.io\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  \u0422\u0430\u043a\u0438\u043c \u0432\u043e\u0442 \u043d\u0435\u0445\u0438\u0442\u0440\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0435 \u0433\u0438\u0431\u043a\u0438\u0435 \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u0435 \u043f\u0430\u043b\u0438\u0442\u0440\u044b \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u0441\u0430\u0439\u0442\u043e\u0432, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044f \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043e\u0442\u0442\u0435\u043d\u043e\u043a \u0438 \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044f\u0441\u044c \u043e\u0442 \u043d\u0435\u0433\u043e.<\/p>\n<p>  \u0418 \u0432\u0441\u0435 \u0432\u0430\u0448\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043d\u0430\u0441\u044b\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0438 \u044f\u0440\u043a\u043e\u0441\u0442\u044c, \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/im\/-q\/2i\/im-q2iioombjpje1u-5cei5zdew.png\"><\/p>\n<h2>\u0411\u0443\u0434\u0443\u0449\u0435\u0435<\/h2>\n<p>  \u0412 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 <a href=\"https:\/\/www.w3.org\/TR\/css-color-4\/#lab-colors\" rel=\"nofollow\">CSS Color Module Level 4<\/a> \u0431\u044b\u043b\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438: lab() \u0438 lch() \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445. LCH \u0438\u043c\u0435\u0435\u0442 \u0442\u0430\u043a\u0443\u044e \u0436\u0435 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u043a\u0430\u043a \u0438 hsl, \u043d\u043e \u043f\u0440\u0438\u0432\u043d\u043e\u0441\u0438\u0442 \u0440\u044f\u0434 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439, \u0441 \u043e\u0433\u043b\u044f\u0434\u043a\u043e\u0439 \u043d\u0430 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 &quot;<a href=\"https:\/\/lea.verou.me\/2020\/04\/lch-colors-in-css-what-why-and-how\/\" rel=\"nofollow\">LCH colors in CSS: what, why, and how?<br \/>  <\/a>&quot;.<\/p>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>  \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0444\u043e\u0440\u043c\u0430\u0442 hsl \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0444\u0430\u043d\u0442\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430\u043c\u0438. \u0412 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u044b \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u0432\u043d\u043e\u0441\u0438\u0442\u0435 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0446\u0432\u0435\u0442\u0430\u043c\u0438 \u0438\u0437 \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u0432 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 CSS.<\/p>\n<p>  P.S. \u0418\u0437\u0432\u0438\u043d\u0438\u0442\u0435 \u0437\u0430 \u0433\u0440\u043e\u043c\u043a\u0438\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \ud83d\ude42<\/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=\"https:\/\/habr.com\/ru\/post\/496768\/\"> https:\/\/habr.com\/ru\/post\/496768\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/496768\/\">\u0412 CSS \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u043e\u0432. \u041e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 \u2014 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 HSL. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u0432\u0430\u043c, \u043a\u0430\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0442\u0430\u043b\u044c\u0449\u0438\u043a\u0430.  <\/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-301701","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/301701","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=301701"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/301701\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=301701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=301701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=301701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}