There are many friends for the first time using 16-bit color display will encounter how to convert 24-bit RGB color to the corresponding 16-bit RGB color problem, through the relevant information, write a translation of the principle of it, I hope it will be helpful to every
Complete example of online color acquisition for RGB web pages implemented by JS, and rgb color Extraction
The example in this article describes the RGB web page color online color filt
In the development of web pages, often need to color settings, and often need to encounter the issue of color conversion, such as: RGB to 16 binary, 16 to RGB, a few days ago in the test, found that the color of the site to convert a class of 16 colors (for example: #000080,
RGB color table, rgb
In HTML development, colors are used in many places, including the font color and background color. The color can be expressed in two ways (Word Representation and hexadecimal notation ).
Words can be search
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.ObjectiveMainly used for color integer, RGB array, 16 binary conversion (-12590395 #3FE2C5 [63,226,197])No need for temporaryCode AnalysisThe value of the int type value of color goes to 16 binary type values includes two scenarios:Scenario One: Thinking: Ca
HSV (hue, saturation, value) is a color space created by a.r. Smith in 1978, also known as the hexcone model ). The color parameters in this model are: tone (H), saturation (s), and brightness (V ).
HSV Color Space Model[1]Tone H: used for angle measurement. value range: 0 ° ~ 360 °. Start from the red color and start
The statistical skin tone model in the RGB color space 1. A brief introduction to the statistical skin tone Model The parameters of the skin color model presented in previous articles, since the parameter values are fixed, the segmentation error from the test image set is likely to be large (but sufficient in the case of adequate illumination). For the dim light
Original: http://www.cnblogs.com/carekee/articles/3629964.html
First, the basicFor color turn grayscale, there is a well-known psychological formula:
Gray = r*0.299 + g*0.587 + b*0.114
Second, integer algorithm
In practical applications, it is desirable to avoid low-speed floating-point operations, so integer arithmetic is required.Note that the coefficients are all 3-bit accurate, and we can scale them up to 1000 times times to implement an integer a
First, the basisFor color to grayscale, there is a well-known psychological formula:
Gray = r*0.299 + g*0.587 + b*0.114
Second, integer algorithm
In practical application, we want to avoid low speed floating-point operation, so we need integer algorithm.Note that the coefficients are all 3-bit precision, we can scale them 1000 times times to implement the integer arithmetic:
Gray = (r*299 + g*587 + b*114 + 500)/1000
First, the basisFor color to grayscale, there is a well-known psychological formula:
Gray = r*0.299 + g*0.587 + b*0.114
Second, integer algorithm
In practical application, we want to avoid low speed floating-point operation, so we need integer algorithm.Note that the coefficients are all 3-bit precision, we can scale them 1000 times times to implement the integer arithmetic:
Gray = (r*299 + g*587 + b*114 + 500)/1000
PHP functions convert 16 color codes to RGB color values
Use the PHP function to convert 16 forbidden color codes to RGB color values.
/** * Function 16 binary color converted to
() function
> ARGs (HSV)
Function (H = 1, S = 1, V = 1, Gamma = 1, alpha)
Tone (H), saturation (s), brightness (V ).
Example:
> X = runif (10000,-250,250)
> Hist (x, breaks = seq (-250,250, 5), Col = HSV (SEQ (0.01,) # With seq sequence, the default saturation and brightness are 1
(3) Gray () or gray ()
> ARGs (Gray) function (level) Where: Level specifies the gray level, which is 0 ~ The number of one, 0 is black, and 1 is white. Example:> hist (x, breaks = seq (-250,250, 5), Col = gray (SEQ (
mannerMEDIASUBTYPE_AYUV 4:4:4 YUV format with alpha channelMEDIASUBTYPE_Y41P y41p format, packaged in 4:1:1 mannermediasubtype_y411 Y411 Format (the actual format is the same as Y41P)mediasubtype_y211 Y211 FormatMEDIASUBTYPE_IF09 IF09 FormatMEDIASUBTYPE_IYUV IYUV FormatMEDIASUBTYPE_YV12 YV12 FormatMEDIASUBTYPE_YVU9 YVU9 FormatThe following is a description of each RGB format.¨RGB1, RGB4, RGB8 are both color
PHP Code: 16 binary color converted to RGB color value, this article source: Mango station.
Copy to ClipboardWhat to refer to:
[www.bkjia.com]
/**
* 16 binary color converted to RGB color value
* @method Hex2rgb
*/
function Hex2
Zajia previous Android color table only color and hexadecimal, sometimes need to set the R G B component int value, such as PAINT.SETARGB (255, 127, 255, 212), you need to calculate the value of the next component. A color table of type int with R G B component is provided here. Note the first parameter of Paint.setalpha () and Paint.setargb (), which is transpar
The webcolorconverter class converts the predefined color name or RGB color value to the system. Drawing...:. Color object.
WebcolorconverterClass is used to convert the system. Drawing...:. Color object to a predefined color name
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.