Вы находитесь на странице: 1из 2
so20%16 RGB to Grayscalo Conversion Calculator had to know... \ % ® & Academics Beauty Esveaton How to Convert RGB to Grayscale > _ ona computer monitor, cell phone screen, A or digital camera screen, different colors are displayed by varying the amounts of red, ‘green, and blue light that shines through the pixels. This is known as the RGB color model. Pure red, green, and blue look like this: TELL _| pure green (0.255,0), and pure blue (0,0,255). In all RGB encodings, the first RGB to Gray Scale Caleulator | Is the amount of green, and the last value digs Te Cees Pa rer) oat value is the amount of red, the second value ee ae represents the amount of blue, The range of the three numbers Is 0 to 255 Convento Gray Soa Clear Tiwecar | Grayscale images are rendered in black, White, and all the shades of gray in between, The RGB encoding of any gray values Is 3 set of three equal numbers, 8, (&, x, ¥), where x is some integer between 0 and 255, For instance, white is (255,255,255), black Is (0,0,0) and medium gray is (127,127,127). The higher the numbers, the lighter the gray, To convert a non-neutral color to its equivalent grayscale value, you must compute ‘a weighted average of the rec, green, and blue values. The RGB to Grayscale Equation ‘Suppose the RGB value of a color is (r, 9, b), where r, 9, and b are integers between 0 and 255, The grayscale weighted average, x, is given by the formula x = 0,299" + 0,5879 + 0.1140, Notice that the colors are not weighted equally. Since pure green is lighter than pure red and pure blue, t has a higher weight. Pure blue is the darkest of the three, so it receives the least weight, Computation Example: A shade of dark purple has an RGB value of (100, 0, 150). The weighted average is x = 0.299(100) + 0.587(0) + 0.114(150), Which simplifies to x = 47. (Ifthe weighted average doesn't come out to a whole number, round it to the nearest whole number.) So the equivalent gray Is (47, 47, 47) Visual Examples: The chart below shows colors on the left and equiavalent grays fon the right, along with the RGB values. Pure ad (2550.0) Equant Grey (76:76,76) ure Green (0,255,0) _Egualet Grey (250,150,250) 9.255) ula Gray (29,2928) yan (0.255.255) ular Gray (279.279,79), agents (255.0258) gullet Gray (205,205,205) hitpuhwwarhadknow.comechnelogyitgb-to-gray-scale-comerer hil Co How do | calculate mat fora remodelling projec Had2Know Bullding Estin Calculators How to Caleulate Color Contre Conversion Calculator RGB to HSL, HSL to RGB Conversion Calculator RGB to HSV, HSV to RGB Conversion Calculator How to Conver Between RGE Codes w so72016 Yalow (255,255,0) Brown (5885.54) ove (55.1 Pure 200.0150) RGB to Grayscalo Conversion Calculator guvlet Gray (226,226,226) 203,103) aunt cry (146,146,146) Euan Gray (474747) Can you convert a grayscale value back to an RGB color code? Because many different colors can have the same grayscale equivalent, itis nat Possible to match a unique color te leach gray value. For example, the colors below all have the same grayscale equivalent value of (100, 100, 100): Dee CEE CED Ca CED © Hadaknow 2010 - 2016 hitpuhwwrhadknow.comechnclogylgb-to-gray-scale-comerer hil 2

Вам также может понравиться