Get the ARGB value of a color in C #

Source: Internet
Author: User

C # Gets the value of the ARGB of the color

Instance:

UInt16 C = 0x597f; 16 binary color value byte R, G, B; 8-bit RGB value R = (byte) (C >> 10); Remove the component G = (byte) of the High R ((C >> 5) & 0x1f); Remove the component B = (byte) of the high G (C & 0x1f); Remove the component of high-level B Color a = Color.FromArgb (255, R, G, B);

FromArgb (A,R,G,B):

A only alpha RGB is three colors: red, green, blue.

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/7E/78/wKiom1cA78byCx97AABb8eAY8Hk695.png "title=" Qq20160403182548.png "alt=" wkiom1ca78bycx97aabb8eay8hk695.png "/> Learning achievement Dream!

This article is from the "Frank" blog, so be sure to keep this source http://cyg2001.blog.51cto.com/11309618/1759912

Get the ARGB value of a color in C #

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.