{"id":24830,"date":"2017-09-08T18:24:30","date_gmt":"2017-09-08T12:54:30","guid":{"rendered":"https:\/\/www.wikitechy.com\/technology\/?p=24830"},"modified":"2017-09-08T18:24:30","modified_gmt":"2017-09-08T12:54:30","slug":"setcolor-function-c","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/technology\/setcolor-function-c\/","title":{"rendered":"setcolor function in c"},"content":{"rendered":"<p>Declaration :- void setcolor(int color);<\/p>\n<p>In Turbo Graphics each color is assigned a number. Total 16 colors are available. Strictly speaking number of available colors depends on current graphics mode and driver.For Example :- BLACK is assigned 0, RED is assigned 4 etc. setcolor function is used to change the current drawing color.e.g. setcolor(RED) or setcolor(4) changes the current drawing color to RED. Remember that default drawing color is WHITE.<\/p>\n<h2 id=\"c-programming-code-for-setcolor\">C programming code for setcolor<\/h2>\n[pastacode lang=\u201dc\u201d manual=\u201d%23include%3Cgraphics.h%3E%0A%23include%3Cconio.h%3E%0A%20%0Amain()%0A%7B%0A%20%20%20int%20gd%20%3D%20DETECT%2C%20gm%3B%0A%20%20%20initgraph(%26gd%2C%26gm%2C%22C%3A%5C%5CTC%5C%5CBGI%22)%3B%0A%20%0A%20%20%20circle(100%2C100%2C50)%3B%20%20%20%20%20%20%20%20%20%20%2F*%20drawn%20in%20white%20color%20*%2F%20%0A%20%20%20setcolor(RED)%3B%0A%20%20%20circle(200%2C200%2C50)%3B%20%20%20%20%20%20%20%20%20%20%2F*%20drawn%20in%20red%20color%20%20%20*%2F%0A%20%0A%20%20%20getch()%3B%0A%20%20%20closegraph()%3B%0A%20%20%20return%200%3B%0A%7D\u201d message=\u201d\u201d highlight=\u201d\u201d provider=\u201dmanual\u201d\/]\n","protected":false},"excerpt":{"rendered":"<p>setcolor function in c &#8211; c programming -Total 16 colors are available. Strictly speaking number of available colors depends on current graphics mode .<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[83068,83065,83062,83066,83064,83069,83071,83070,83063,83067],"class_list":["post-24830","post","type-post","status-publish","format-standard","hentry","category-coding","tag-c-programming-color-text","tag-color-code-in-c","tag-color-codes-in-c-graphics","tag-floodfill-in-c-graphics","tag-setbkcolor-function-in-computer-graphics","tag-setcolor-c","tag-setcolor-color","tag-setcolor-java","tag-setfillstyle-function-in-computer-graphics","tag-settextstyle-function-in-c"],"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/24830","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=24830"}],"version-history":[{"count":0,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/24830\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media?parent=24830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/categories?post=24830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/tags?post=24830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}