{"id":13000,"date":"2015-10-12T22:58:02","date_gmt":"2015-10-12T19:28:02","guid":{"rendered":"http:\/\/www.xn--mgbguh09aqiwi.com\/?p=13000"},"modified":"2016-07-19T23:54:51","modified_gmt":"2016-07-19T20:24:51","slug":"%d8%aa%d8%a7%d8%a8%d8%b9-php-%d8%aa%d8%a8%d8%af%db%8c%d9%84-%d8%b1%d9%86%da%af-%d9%87%d8%a7%db%8c-hex-%d8%a8%d9%87-rgb-%d9%88-%d8%a8%d9%84%d8%b9%da%a9%d8%b3","status":"publish","type":"post","link":"https:\/\/www.xn--mgbguh09aqiwi.com\/%d8%aa%d8%a7%d8%a8%d8%b9-php-%d8%aa%d8%a8%d8%af%db%8c%d9%84-%d8%b1%d9%86%da%af-%d9%87%d8%a7%db%8c-hex-%d8%a8%d9%87-rgb-%d9%88-%d8%a8%d9%84%d8%b9%da%a9%d8%b3.html","title":{"rendered":"\u062a\u0627\u0628\u0639 php \u062a\u0628\u062f\u06cc\u0644 \u0631\u0646\u06af \u0647\u0627\u06cc HEX \u0628\u0647 RGB \u0648 \u0628\u0644\u0639\u06a9\u0633"},"content":{"rendered":"

\u0647\u0645\u0627\u0646 \u0637\u0648\u0631 \u06a9\u0647 \u0645\u06cc\u062f\u0627\u0646\u06cc\u062f \u0634\u06cc\u0648\u0647 \u0647\u0627\u06cc \u0631\u0646\u06af \u062f\u0647\u06cc \u062f\u0631 \u0637\u0631\u0627\u062d\u06cc \u0648\u0628 \u0633\u0627\u06cc\u062a \u0628\u0647 \u06f4 \u0646\u0648\u0639 \u062a\u0642\u0633\u06cc\u0645 \u0645\u06cc\u0634\u0648\u062f .<\/p>\n

\u0645\u062f\u0644 Name Color , Hex , RGB \u0648 HSL \u0627\u06cc\u0646 4 \u0645\u062f\u0644 \u0627\u0632 \u0631\u0646\u06af \u062f\u0647\u06cc \u0631\u0627 \u062a\u0634\u06a9\u06cc\u0644 \u0645\u06cc\u062f\u0647\u0646\u062f . \u0627\u0645\u0627 \u0627\u06cc\u0646 \u0634\u06cc\u0648\u0647 \u0647\u0627\u06cc \u0631\u0646\u06af \u062f\u0647\u06cc \u0642\u0627\u0628\u0644\u06cc\u062a \u062a\u0628\u062f\u06cc\u0644 \u0628\u0647 \u06cc\u06a9\u062f\u06cc\u06af\u0631 \u0631\u0627 \u0646\u06cc\u0632 \u062f\u0627\u0631\u0646\u062f .<\/p>\n

\u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u0633\u0627\u0639\u062a \u0627\u0632 \u0633\u0627\u06cc\u062a\u00a0\u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u062f\u0627\u062a \u06a9\u0627\u0645<\/span> , \u062f\u0648 \u062a\u0627\u0628\u0639 \u0627\u0632 PHP \u0631\u0627 \u0622\u0645\u0627\u062f\u0647 \u0633\u0627\u062e\u062a\u0647 \u0627\u0645 \u06a9\u0647 \u0642\u0627\u062f\u0631 \u0627\u0633\u062a\u00a0\u0645\u0642\u0627\u062f\u06cc\u0631 HEX \u0648 RGB \u0631\u0627 \u06af\u0631\u0641\u062a\u0647 \u0648 \u0622\u0646\u0647\u0627 \u0631\u0627 \u0628\u0647 \u06cc\u06a9\u062f\u06cc\u06af\u0631 \u062a\u0628\u062f\u06cc\u0644 \u0646\u0645\u0627\u06cc\u062f .<\/p>\n

\u0627\u0646\u0634\u0627\u0644\u0644\u0647 \u062f\u0631 \u0622\u06cc\u0646\u062f\u0647 \u0627\u06cc \u0646\u0647 \u0686\u0646\u062f\u0627\u0646 \u062f\u0648\u0631 , \u062a\u0648\u0627\u0628\u0639 \u062f\u06cc\u06af\u0631\u06cc \u0628\u0631\u0627\u06cc \u062a\u0628\u062f\u06cc\u0644 \u0628\u0642\u06cc\u0647 \u0634\u06cc\u0648\u0647 \u0647\u0627 \u0628\u0647 \u0647\u0645\u062f\u06cc\u06af\u0631 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0634\u0645\u0627 \u0639\u0632\u06cc\u0632\u0627\u0646 \u0642\u0631\u0627\u0631 \u062e\u0648\u0627\u0647\u0645 \u062f\u0627\u062f .<\/p>\n

<\/p>\n

 <\/p>\n

\"\u062a\u0627\u0628\u0639<\/a><\/p>\n

1- \u062a\u0627\u0628\u0639 \u062a\u0628\u062f\u06cc\u0644 \u0646\u0648\u0639 \u0631\u0646\u06af HEX \u0628\u0647 RGB :<\/span><\/p>\n

<?php function vms_hex2rgb($color)\r\n{\r\n    if ($color[0] == '#')\r\n        $color = substr($color, 1);\r\n\r\n    if (strlen($color) == 6)\r\n        list($r, $g, $b) = array($color[0].$color[1],\r\n                                 $color[2].$color[3],\r\n                                 $color[4].$color[5]);\r\n    elseif (strlen($color) == 3)\r\n        list($r, $g, $b) = array($color[0].$color[0], $color[1].$color[1], $color[2].$color[2]);\r\n    else\r\n        return false;\r\n\r\n    $r = hexdec($r); $g = hexdec($g); $b = hexdec($b);\r\n\r\n    return 'rgb('.$r.','.$g.','.$b.')';\r\n}\r\n?><\/pre>\n

\u0628\u0631\u0627\u06cc \u0646\u0645\u0627\u06cc\u0634 \u06a9\u062f \u0628\u0627\u0644\u0627 \u0628\u0627\u06cc\u062f \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u0639\u0645\u0644 \u06a9\u0631\u062f :<\/p>\n

<?php echo vms_hex2rgb('\u06a9\u062f \u0631\u0646\u06af') ?>\r\n\r\n\u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u062b\u0627\u0644\r\n\r\n<?php echo vms_hex2rgb('#ff0000') ?><\/pre>\n

2 –\u00a0\u062a\u0627\u0628\u0639 \u062a\u0628\u062f\u06cc\u0644 \u0646\u0648\u0639 \u0631\u0646\u06af RGB \u0628\u0647 HEX\u00a0:<\/span><\/p>\n

<?php function vms_rgb2hex($r, $g=-1, $b=-1)\r\n{\r\n    if (is_array($r) && sizeof($r) == 3)\r\n        list($r, $g, $b) = $r;\r\n\r\n    $r = intval($r); $g = intval($g);\r\n    $b = intval($b);\r\n\r\n    $r = dechex($r<0?0:($r>255?255:$r));\r\n    $g = dechex($g<0?0:($g>255?255:$g));\r\n    $b = dechex($b<0?0:($b>255?255:$b));\r\n\r\n    $color = (strlen($r) < 2?'0':'').$r;\r\n    $color .= (strlen($g) < 2?'0':'').$g;\r\n    $color .= (strlen($b) < 2?'0':'').$b;\r\n    return '#'.$color;\r\n}\r\n?><\/pre>\n

\u0628\u0631\u0627\u06cc \u0646\u0645\u0627\u06cc\u0634 \u06a9\u062f \u0628\u0627\u0644\u0627 \u0628\u0627\u06cc\u062f \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u0639\u0645\u0644 \u06a9\u0631\u062f :<\/p>\n

<?php echo vms_rgb2hex(\u06a9\u062f \u0631\u0646\u06af) ?>\r\n\r\n\u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u062b\u0627\u0644 \r\n\r\n<?php echo vms_rgb2hex(255,000,255) ?><\/pre>\n

\u067e\u062e\u0634 \u0627\u062e\u062a\u0635\u0627\u0635\u06cc<\/p>\n

\u06af\u0631\u062f\u0627\u0648\u0631\u06cc \u0648 \u0622\u0645\u0648\u0632\u0634 : \u0648\u062d\u06cc\u062f \u0645\u062c\u06cc\u062f\u06cc<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"

\u0647\u0645\u0627\u0646 \u0637\u0648\u0631 \u06a9\u0647 \u0645\u06cc\u062f\u0627\u0646\u06cc\u062f \u0634\u06cc\u0648\u0647 \u0647\u0627\u06cc \u0631\u0646\u06af \u062f\u0647\u06cc \u062f\u0631 \u0637\u0631\u0627\u062d\u06cc \u0648\u0628 \u0633\u0627\u06cc\u062a \u0628\u0647 \u06f4 \u0646\u0648\u0639 \u062a\u0642\u0633\u06cc\u0645 \u0645\u06cc\u0634\u0648\u062f . \u0645\u062f\u0644 Name Color , Hex , RGB \u0648 HSL \u0627\u06cc\u0646 4 \u0645\u062f\u0644 \u0627\u0632 \u0631\u0646\u06af \u062f\u0647\u06cc \u0631\u0627 \u062a\u0634\u06a9\u06cc\u0644 \u0645\u06cc\u062f\u0647\u0646\u062f . \u0627\u0645\u0627 \u0627\u06cc\u0646 \u0634\u06cc\u0648\u0647 \u0647\u0627\u06cc \u0631\u0646\u06af \u062f\u0647\u06cc \u0642\u0627\u0628\u0644\u06cc\u062a \u062a\u0628\u062f\u06cc\u0644 \u0628\u0647 \u06cc\u06a9\u062f\u06cc\u06af\u0631 \u0631\u0627 \u0646\u06cc\u0632 \u062f\u0627\u0631\u0646\u062f . \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u0633\u0627\u0639\u062a \u0627\u0632 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1099],"tags":[13755,8500,13742,13751,13753,13752,13757,13754,13756,1102,13749,13750],"_links":{"self":[{"href":"https:\/\/www.xn--mgbguh09aqiwi.com\/wp-json\/wp\/v2\/posts\/13000"}],"collection":[{"href":"https:\/\/www.xn--mgbguh09aqiwi.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xn--mgbguh09aqiwi.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xn--mgbguh09aqiwi.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xn--mgbguh09aqiwi.com\/wp-json\/wp\/v2\/comments?post=13000"}],"version-history":[{"count":0,"href":"https:\/\/www.xn--mgbguh09aqiwi.com\/wp-json\/wp\/v2\/posts\/13000\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.xn--mgbguh09aqiwi.com\/wp-json\/wp\/v2\/media?parent=13000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xn--mgbguh09aqiwi.com\/wp-json\/wp\/v2\/categories?post=13000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xn--mgbguh09aqiwi.com\/wp-json\/wp\/v2\/tags?post=13000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}