C# Color

Color c = Color.FromArgb(int.Parse("#FFFFFF".Replace("#",""),System.Globalization.NumberStyles.AllowHexSpecifier));

Color.FromArgb 메서드 (Int32, Int32, Int32, Int32)

네임스페이스:   System.Drawing
어셈블리:  System.Drawing(System.Drawing.dll에 있음)

public static Color FromArgb(
	int alpha,
	int red,
	int green,
	int blue

매개 변수

Type: System.Int32알파 구성 요소입니다. 유효한 값은 0부터 255입니다.
Type: System.Int32빨강 구성 요소입니다. 유효한 값은 0부터 255입니다.
Type: System.Int32녹색 구성 요소입니다. 유효한 값은 0부터 255입니다.
Type: System.Int32파랑 구성 요소입니다. 유효한 값은 0부터 255입니다.

반환 값

Type: System.Drawing.Color이 메서드가 만드는 Color입니다.

Exception Condition
alpharedgreen, 또는 blue 가 0 보다 작거나 255 자를 초과 합니다.
불투명 한 색을 만들려면 설정 alpha 255입니다. 반투명 색을 만들려면 설정 alpha 1에서 254 사이의 임의 값으로.
다음 코드 예제는 Windows forms에서 사용 하도록 설계 하 고 있어야 PaintEventArgse, 의 매개 변수인는 Paint 이벤트 처리기입니다. 이 코드에서는 다음 작업을 수행합니다.

  • 세 개 만듭니다 각각 서로 다른 색, 브러시입니다. 각 Color 는 브러시를 만드는 데 사용 되는 네 가지 구성 요소 값 (알파, 빨간색, 녹색, 파란색)에서 만들어집니다.
  • 세 개의 원을 배치 하는 가상의 삼각형을 사용 합니다.
  • 각 원은 대 한 다른 브러시를 사용 하는 삼각형의 꼭지점을 중심으로 각각 3 개의 겹치는 원을 그립니다.
public void FromArgb1(PaintEventArgs e)
    Graphics     g = e.Graphics;
    // Transparent red, green, and blue brushes.
    SolidBrush trnsRedBrush = new SolidBrush(Color.FromArgb(120, 255, 0, 0));
    SolidBrush trnsGreenBrush = new SolidBrush(Color.FromArgb(120, 0, 255, 0));
    SolidBrush trnsBlueBrush = new SolidBrush(Color.FromArgb(120, 0, 0, 255));
    // Base and height of the triangle that is used to position the
    // circles. Each vertex of the triangle is at the center of one of the
    // 3 circles. The base is equal to the diameter of the circles.
    float   triBase = 100;
    float   triHeight = (float)Math.Sqrt(3*(triBase*triBase)/4);
    // Coordinates of first circle's bounding rectangle.
    float   x1 = 40;
    float   y1 = 40;
    // Fill 3 over-lapping circles. Each circle is a different color.
    g.FillEllipse(trnsRedBrush, x1, y1, 2*triHeight, 2*triHeight);
    g.FillEllipse(trnsGreenBrush, x1 + triBase/2, y1 + triHeight,
        2*triHeight, 2*triHeight);
    g.FillEllipse(trnsBlueBrush, x1 + triBas

“C# Color”의 130개의 댓글

  1. Please let me know if you’re looking for a author for your
    site. You have some really great articles and I think I would be a good asset.
    If you ever want to take some of the load off, I’d absolutely love to write
    some content for your blog in exchange for a link back to mine.

    Please blast me an e-mail if interested. Thanks!

  2. Please let me know if you’re looking for a writer
    for your blog. You have some really good articles and I think I
    would be a good asset. If you ever want to take some of the load off, I’d absolutely
    love to write some material for your blog in exchange for a link back to mine.
    Please shoot me an email if interested. Kudos!

  3. I simply want to say I’m beginner to blogging and site-building and honestly liked your web site. Likely I’m want to bookmark your blog . You certainly have good posts. Thanks a bunch for sharing with us your webpage.

  4. Hey there! This is kind of off topic but I need some guidance from an established blog. Is it very hard to set up your own blog? I’m not very techincal but I can figure things out pretty fast. I’m thinking about creating my own but I’m not sure where to start. Do you have any points or suggestions? Thanks

  5. Hello would you mind letting me know which webhost you’re utilizing? I’ve loaded your blog in 3 different web browsers and I must say this blog loads a lot quicker then most. Can you suggest a good web hosting provider at a honest price? Kudos, I appreciate it!

  6. Great ЎV I should certainly pronounce, impressed with your site. I had no trouble navigating through all tabs as well as related info ended up being truly easy to do to access. I recently found what I hoped for before you know it at all. Quite unusual. Is likely to appreciate it for those who add forums or anything, website theme . a tones way for your client to communicate. Excellent task..

  7. I was extremely happy to find this web-site. I wanted to many thanks for your time for this remarkable read!! I most definitely delighting in every bit of it and also I have you bookmarked to take a look at new things you article.

  8. I discovered your blog site on google and also check a few of your very early blog posts. Continue to maintain the great run. I simply additional up your RSS feed to my MSN News Visitor. Looking for forward to learning more from you later on!?

  9. An outstanding share, I just provided this onto an associate that was doing a little analysis on this. And also he actually bought me breakfast because I discovered it for him. smile. So let me reword that: Thnx for the treat! However yeah Thnkx for spending the time to review this, I feel strongly concerning it and love reading more on this topic. When possible, as you come to be experience, would you mind upgrading your blog site with more details? It is highly handy for me. Large thumb up for this article!

  10. I’m extremely impressed with your writing skills and
    also with the layout on your weblog. Is this a paid theme
    or did you customize it yourself? Either way keep
    up the excellent quality writing, it’s rare to see a great blog like this
    one these days.

  11. I?m pleased, I should say. Really hardly ever do I experience a blog that?s both instructional and entertaining, and also let me inform you, you have actually hit the nail on the head. Your idea is superior; the problem is something that insufficient people are speaking smartly around. I am really pleased that I stumbled across this in my search for something associating with this.

  12. I?m amazed, I have to state. Truly hardly ever do I run into a blog site that?s both informative and also enjoyable, and let me tell you, you have actually hit the nail on the head. Your idea is outstanding; the problem is something that not nearly enough individuals are speaking smartly about. I am extremely pleased that I came across this in my look for something associating with this.

  13. Aw, this was an actually wonderful article. In idea I would love to place in composing like this additionally? taking some time as well as actual effort to make a very good article? but what can I claim? I put things off alot as well as by no means appear to get something done.

  14. This website is actually a walk-through for all of the info you desired regarding this as well as didn?t understand who to ask. Glimpse below, and you?ll most definitely discover it.

  15. I am commonly to blogging and i truly value your content. The short article has really peaks my rate of interest. I am going to bookmark your site and maintain looking for new information.

  16. Oh my benefits! a remarkable article guy. Thank you Nevertheless I am experiencing problem with ur rss. Don?t recognize why Unable to sign up for it. Is there any individual getting the same rss trouble? Any individual who recognizes kindly react. Thnkx

  17. There are some interesting times in this post however I don?t know if I see all of them center to heart. There is some credibility however I will certainly take hold opinion until I explore it even more. Great short article, thanks and also we want much more! Added to FeedBurner as well

  18. This website is truly a walk-through for every one of the info you desired concerning this and also didn?t understand that to ask. Peek below, as well as you?ll definitely discover it.

  19. Can I simply say what a relief to find somebody that really understands what theyre discussing online. You absolutely understand just how to bring an issue to light and make it vital. More individuals need to read this as well as comprehend this side of the story. I angle believe youre not a lot more popular due to the fact that you most definitely have the present.

  20. Can I simply claim what an alleviation to find a person who really recognizes what theyre talking about on the net. You absolutely understand just how to bring a problem to light as well as make it crucial. More people require to read this and recognize this side of the tale. I cant believe youre not extra popular because you definitely have the gift.

  21. I simply want to say I am just new to blogging and absolutely enjoyed you’re web site. Very likely I’m want to bookmark your website . You actually have great posts. Appreciate it for sharing your web-site.

  22. I do agree with all of the concepts you have introduced on your post. They are very convincing and will definitely work. Nonetheless, the posts are too short for beginners. May you please extend them a bit from next time? Thank you for the post.

  23. You really make it seem so easy with your presentation but I find this matter to be really something that I think I would never understand. It seems too complex and very broad for me. I am looking forward for your next post, I will try to get the hang of it!

  24. I simply want to mention I’m all new to blogs and absolutely enjoyed your blog. Probably I’m likely to bookmark your blog . You amazingly come with perfect well written articles. Thanks a lot for revealing your web page.

  25. I’m really loving the theme/design of your blog. Do you ever run into any web browser compatibility issues? A number of my blog readers have complained about my blog not working correctly in Explorer but looks great in Firefox. Do you have any recommendations to help fix this problem?

  26. Wow, superb blog format! How long have you ever been blogging for? you make blogging look easy. The whole look of your site is great, let alone the content material!

  27. Good – I should certainly pronounce, impressed with your web site. I had no trouble navigating through all the tabs and related info ended up being truly simple to do to access. I recently found what I hoped for before you know it in the least. Reasonably unusual. Is likely to appreciate it for those who add forums or anything, website theme . a tones way for your customer to communicate. Excellent task..

  28. I’m really inspired along with your writing skills as well as with the format in your blog. Is this a paid topic or did you modify it yourself? Either way stay up the excellent quality writing, it is uncommon to see a nice blog like this one these days..

  29. After study a number of of the weblog posts in your website now, and I really like your approach of blogging. I bookmarked it to my bookmark web site checklist and might be checking back soon. Pls check out my web page as well and let me know what you think.

  30. Its like you read my mind! You seem to know so much about this, like you wrote the book in it or something. I think that you could do with some pics to drive the message home a little bit, but other than that, this is magnificent blog. An excellent read. I’ll definitely be back.

  31. I simply want to mention I’m newbie to weblog and honestly savored this web site. Likely I’m going to bookmark your website . You definitely come with very good articles and reviews. Many thanks for sharing with us your webpage.

  32. Have you ever considered writing an e-book or guest authoring on other sites? I have a blog based upon on the same topics you discuss and would love to have you share some stories/information. I know my audience would enjoy your work. If you are even remotely interested, feel free to send me an e-mail.

  33. Howdy just wanted to give you a quick heads up. The text in your post seem to be running off the screen in Internet explorer. I’m not sure if this is a formatting issue or something to do with internet browser compatibility but I thought I’d post to let you know. The design look great though! Hope you get the issue resolved soon. Thanks

  34. Hey there friend, just roaming through the world wide web search data and discovered your site. I’m engraved with the blogposts that you own within this web page. This displays how good you grasp this specific issue. Bookmarked this web site, will certainly come back to get more detail. You, my buddy, Rock!!!

  35. After going over a few of the articles on your site, I honestly like your way of writing a blog. I book-marked it to my bookmark website list and will be checking back soon. Take a look at my web site too and tell me how you feel.

  36. I’m amazed, I must say. Seldom do I encounter a blog that’s equally educative and entertaining, and let me tell you, you’ve hit the nail on the head. The problem is something that not enough men and women are speaking intelligently about. Now i’m very happy that I found this in my hunt for something regarding this.

  37. I simply had to appreciate you once again. I am not sure the things I would’ve taken care of in the absence of those hints shown by you regarding that industry. Entirely was a very difficult dilemma in my circumstances, nevertheless being able to view the very skilled approach you treated the issue forced me to weep over delight. Now i am happier for the work and then pray you recognize what a great job you have been carrying out training people today all through a web site. Most probably you have never come across any of us.

  38. You’re so awesome! I do not believe I’ve truly read through something like this before. So wonderful to find another person with some original thoughts on this topic. Really.. many thanks for starting this up. This site is something that is needed on the web, someone with some originality.

  39. Excellent post. I was checking constantly this blog and I am impressed! Very useful information specifically the last part 🙂 I care for such information a lot. I was seeking this certain information for a long time. Thank you and good luck.

  40. I realized more new stuff on this fat loss issue. One issue is a good nutrition is highly vital any time dieting. A huge reduction in junk food, sugary food, fried foods, sugary foods, red meat, and white colored flour products may perhaps be necessary. Retaining wastes organisms, and poisons may prevent objectives for losing fat. While specific drugs momentarily solve the problem, the unpleasant side effects are usually not worth it, plus they never offer you more than a short-lived solution. It is just a known undeniable fact that 95 of fad diet plans fail. Thanks for sharing your opinions on this blog site.

  41. Thanks , I’ve just been looking for information about this topic for a long time and yours is the greatest I’ve came upon so far. But, what about the bottom line? Are you certain in regards to the source?

  42. The next time I read a weblog, I hope that it doesnt disappoint me as much as this one. I mean, I do know it was my option to learn, but I truly thought youd have something fascinating to say. All I hear is a bunch of whining about something that you may repair for those who werent too busy searching for attention.

  43. An interesting discussion is definitely worth comment. There’s no doubt that that you ought to write more about this subject matter, it may not be a taboo matter but generally folks don’t talk about such subjects. To the next! Cheers!

  44. I do enjoy the way you have framed this particular difficulty and it does indeed give me personally some fodder for thought. Nonetheless, through everything that I have observed, I simply just hope when the responses pile on that individuals keep on point and don’t get started on a soap box regarding the news of the day. Anyway, thank you for this superb piece and while I do not go along with the idea in totality, I respect the standpoint.

  45. Nice idea dude. May I know these tweets and so I may adhere to one ? Numerous thanks Plus my best prayers to the people close by Tokyo hopefully your are well along with comfortable

  46. I’m amazed, I have to admit. Rarely do I come across a blog that’s equally educative and engaging, and without a doubt, you have hit the nail on the head. The problem is something which too few people are speaking intelligently about. I am very happy I found this in my hunt for something relating to this.

  47. Took me time for it to have the ability to understand all of the comments, yet I really appreciated this write-up. This turned out to be Invaluable to my opinion and I am certain that to everyone this commenters below! It’s definitely great each time a particular person are unable to just learn, but additionally interested! I’m certain you needed enjoyment penning this type of write-up.

  48. certainly like your web-site however you have to test the spelling on quite a few of your posts. Many of them are rife with spelling issues and I to find it very troublesome to inform the truth then again I will surely come back again.

  49. Excellent beat ! I wish to apprentice while you amend your site, how could i subscribe for a blog website? The account aided me a appropriate deal. I had been a little bit familiar of this your broadcast provided shiny clear idea

  50. Howdy! I could have sworn I’ve been to this blog before but after going through a few of the posts I realized it’s new to me. Anyhow, I’m certainly pleased I stumbled upon it and I’ll be book-marking it and checking back regularly!

  51. Undeniably imagine that that you said. Your favourite justification appeared to be at the internet the simplest thing to consider of. I say to you, I definitely get annoyed even as other people think about issues that they just don’t realize about. You controlled to hit the nail upon the top as smartly defined out the entire thing without having side-effects , other people could take a signal. Will probably be back to get more. Thanks

댓글 남기기