{"id":24782,"date":"2017-09-07T18:05:47","date_gmt":"2017-09-07T12:35:47","guid":{"rendered":"https:\/\/www.wikitechy.com\/technology\/?p=24782"},"modified":"2017-09-07T18:05:47","modified_gmt":"2017-09-07T12:35:47","slug":"getcolor-function","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/technology\/getcolor-function\/","title":{"rendered":"getcolor function"},"content":{"rendered":"<p>getcolor function returns the current drawing color.<\/p>\n<p>Declaration : int getcolor();<\/p>\n<p>e.g. a = getcolor(); \/\/ a is an integer variable<br \/>\nif current drawing color is WHITE then a will be 15.<br \/>\nSee colors in c graphics.<\/p>\n[ad type=&#8221;banner&#8221;]\n<h2 id=\"c-programming-code-for-getcolor\">C programming code for getcolor<\/h2>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-c code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-c code-embed-code\">#include&lt;graphics.h&gt;<br\/>#include&lt;conio.h&gt;<br\/> <br\/>main()<br\/>{<br\/>   int gd = DETECT, gm, drawing_color;<br\/>   char a[100];<br\/> <br\/>   initgraph(&amp;gd,&amp;gm,&quot;C:\\\\TC\\\\BGI&quot;);<br\/> <br\/>   drawing_color = getcolor();<br\/> <br\/>   sprintf(a,&quot;Current drawing color = %d&quot;, drawing_color);<br\/>   outtextxy( 10, 10, a );<br\/> <br\/>   getch();<br\/>   closegraph();<br\/>   return 0;<br\/>}<\/code><\/pre> <\/div>\n[ad type=&#8221;banner&#8221;]\n","protected":false},"excerpt":{"rendered":"<p>getcolor function-getcolor function returns the current drawing color.Declaration : int getcolor();<br \/>\ne.g. a = getcolor(); \/\/ a is an integer variable<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[82927,1],"tags":[82940,82935,82934,82938,82937,82936,82931,82929,82944,82939,82941,82928,82933,82930,82942,82943,82932],"class_list":["post-24782","post","type-post","status-publish","format-standard","hentry","category-c-programming-2","category-coding","tag-all-colors-in-the-world","tag-android-get-color-object-from-resource","tag-android-get-color-string-from-resource","tag-color-cancer-gene-test","tag-color-dna-test","tag-colors-genetic-testing","tag-contextcompat-getcolor-context","tag-contextcompat-getcolor-example","tag-floodfill-function-in-computer-graphics","tag-get-color-from-image","tag-getcolor-activate","tag-getcolor-android","tag-getcolor-java","tag-resources-getcolor-deprecated-xamarin","tag-set-color-in-c","tag-setcolor-in-c-graphics","tag-xamarin-get-color-from-resource"],"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/24782","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/comments?post=24782"}],"version-history":[{"count":0,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/24782\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media?parent=24782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/categories?post=24782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/tags?post=24782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}